Communication Device and Terminal Device

ABSTRACT

A system and method for providing network information using a short-range wireless communication path between a communication device and a terminal device is described. In some examples, authentication information is required from the terminal device prior to communication of the network information. In some examples, the short-range wireless communication path is disconnected and reestablished in which one of the terminal device and the communication device changes operation modes of a short-range wireless interface.

CROSS-REFERENCE TO RELATED APPLICATION

This application is a divisional of prior U.S. application Ser. No.14/498,213, filed Sep. 26, 2014, which claims priority from JapanesePatent Application No. 2013-204535, filed on Sep. 30, 2013, the contentof which are incorporated herein by reference in its entirety.

TECHNICAL FIELD

Aspects disclosed herein relate to a technique used in a communicationdevice that is capable of communicating with a terminal device.

BACKGROUND

A known information processing device performs communication with acommunication terminal using a Near Field Communication (“NFC”) wirelesscommunication protocol. The information processing device changes anoperating mode of an NFC-enabled device, which is connected to theinformation processing device, to appropriate one of a passive tag modeand a Peer-to-Peer (“P2P”) mode, to perform communication using the NFCwireless communication protocol with the communication terminal.

SUMMARY

In the technique used in the known information processing device,consideration might not be given to providing another interface that isdifferent from an interface for communication using the NFC wirelesscommunication protocol.

Accordingly, aspects of the disclosure provide for a technique that mayenable selective performance of communication using appropriate one of afirst interface and a second interface that is different from the firstinterface.

According to one or more aspects of the disclosure, the communicationdevice may determine whether the communication device performs wirelesscommunication of target data with the terminal device using theparticular wireless network via the second interface depending onwhether it is determined, in the first determination process, that theparticular authentication information is listed on the list used forauthentication. Therefore, according to the communication device,communication using appropriate one of the first interface and thesecond interface that may be different from the first interface may beperformed selectively.

According to one or more aspects of the disclosure, the terminal devicemay perform wireless communication of target data with the communicationdevice using the particular wireless network via the second interfacedepending on whether it is determined, by the terminal device, that theparticular authentication information is listed on the list used forauthentication. Therefore, according to the terminal device,communication using appropriate one of the first interface and thesecond interface that may be different from the first interface may beperformed selectively.

According to one or more aspects of the disclosure, a system and methodfor providing network information using a short-range wirelesscommunication path between a communication device and a terminal deviceis described. In some examples, authentication information is requiredfrom the terminal device prior to communication of the networkinformation. In some examples, the short-range wireless communicationpath is disconnected and reestablished in which one of the terminaldevice and the communication device changes operation modes of ashort-range wireless interface.

In one aspect, a communication device including a short-range wirelessinterface, a Wi-Fi interface, and instructions that control thecommunication device to receive, over a short-range wireless connectionvia the short-range wireless interface, request information from theterminal device, transmit, via the short-range wireless interface, firstresponse information to the terminal device, receive, via theshort-range wireless interface in the other mode, authenticationinformation from the terminal device, execute, a first determinationprocess in which the communication device determines whether theterminal device is authenticated, perform, via the short-range wirelessinterface in the other mode, communication of network information to beused to connect with the Wi-Fi interface, and perform wirelesscommunication with the terminal device using the Wi-Fi interface.

In another aspect, a terminal device may include a short-range wirelessinterface, a Wi-Fi interface, and instructions that control the terminaldevice to transmit, over a short-range wireless connection via theshort-range wireless interface, request information to the communicationdevice, receive, via the short-range wireless interface, first responseinformation from the communication device, transmit, via the short-rangewireless interface in the other mode, authentication information to thecommunication device, perform, via the short-range wireless interface,communication of network information to be used to connect with theWi-Fi interface, and perform wireless communication with thecommunication device using the Wi-Fi interface.

In a further aspect, the communication device may include a short-rangewireless interface, a Wi-Fi interface, and instructions that control thecommunication device to receive, over a short-range wireless connectionvia the short-range wireless interface, request information from theterminal device, transmit, via the short-range wireless interface, firstresponse information to the terminal device, receive, via theshort-range wireless interface, authentication information from theterminal device, transmit the received authentication information toanother device, receive confirmation from the another device that theterminal device is authorized, perform, via the short-range wirelessinterface, communication of network information to be used to connectwith the Wi-Fi interface, and perform wireless communication with theterminal device using the Wi-Fi interface.

Control methods and computer programs for implementing theabove-described communication device, and computer-readable storagemedia storing the computer programs may have novelty and utility.Control methods and computer programs for implementing theabove-described terminal device, and computer-readable storage mediastoring the computer programs may also have novelty and utility.Communication systems including the above-described communication deviceand at least one of a plurality of terminal devices may also havenovelty and utility.

DESCRIPTION OF THE DRAWINGS

For a more complete understanding of the present disclosure, needssatisfied thereby, and the objects, features, and advantages thereof,reference now is made to the following descriptions taken in connectionwith the accompanying drawings.

FIG. 1 illustrates an example configuration of a communication system ina first illustrative embodiment according to one or more aspects of thedisclosure.

FIG. 2 is a flowchart depicting an example communication processexecuted in a multifunction peripheral (“MFP”) in the first illustrativeembodiment according to one or more aspects of the disclosure.

FIG. 3 is a flowchart depicting an example Secure Function Lock (“SFL”)authentication process executed in the MFP in the first illustrativeembodiment according to one or more aspects of the disclosure.

FIG. 4 is a flowchart depicting an example function execution processexecuted in a mobile terminal in the first illustrative embodimentaccording to one or more aspects of the disclosure.

FIG. 5 is a sequence diagram depicting communication performed betweendevices in Case A1 in the first illustrative embodiment according to oneor more aspects of the disclosure.

FIG. 6 is a sequence diagram depicting communication performed betweendevices in Case A2 in the first illustrative embodiment according to oneor more aspects of the disclosure.

FIG. 7 is a sequence diagram depicting communication performed betweendevices in Case B in a second illustrative embodiment according to oneor more aspects of the disclosure.

FIG. 8 is a flowchart depicting an example SFL authentication processexecuted in the MFP in a third illustrative embodiment according to oneor more aspects of the disclosure.

FIG. 9 is a sequence diagram depicting communication performed betweendevices in Case C1 in the third illustrative embodiment according to oneor more aspects of the disclosure.

FIG. 10 illustrates an example SFL table used in Case C1 in the thirdillustrative embodiment according to one or more aspects of thedisclosure.

FIG. 11 is a sequence diagram depicting communication performed betweendevices in Case C2 in the third illustrative embodiment according to oneor more aspects of the disclosure.

FIG. 12 illustrates an example SFL table used in Case C2 in the thirdillustrative embodiment according to one or more aspects of thedisclosure.

DETAILED DESCRIPTION

Hereinafter, illustrative embodiments will be described with referenceto the accompanying drawings. Referring to FIG. 1, an exampleconfiguration of a communication system 2 according to a firstillustrative embodiment will be described. As depicted in FIG. 1, thecommunication system 2 includes a multifunction peripheral (“MFP”) 10and mobile terminals PT1, PT2, and PT3. Each of the MFP 10 and themobile terminals PT1, PT2, and PT3 is configured to perform wirelesscommunication using a communication protocol that complies with a NearField Communication (“NFC”) standard (i.e., an NFC wirelesscommunication protocol). Each of the MFP 10 and the mobile terminalsPT1, PT2, and PT3 is configured to also perform wireless communicationusing another communication protocol that complies with a WirelessFidelity (“Wi-Fi®”) system created by the Wi-Fi Alliance (Wi-Fi® is aregistered certification mark owned by the Wi-Fi Alliance of Austin,Tex.).

Referring to FIG. 1, an example configuration of the MFP 10 will bedescribed. The MFP 10 is a peripheral device (e.g., a personal-computer(“PC”) peripheral device) that is capable of performing multiplefunctions, for example, a printing function and a scanning function. TheMFP 10 includes an operation unit 12, a display unit 14, a printingexecution unit 16, a scanning execution unit 18, an NFC interface(“I/F”) 20, a wireless local area network (“LAN”) interface (“I/F”) 22,and a controller 30, each of which are connected with a bus (referencenumeral is omitted).

The operation unit 12 includes a plurality of keys. A user is allowed toinput various instructions into the MFP 10 by operating the operationunit 12. The display unit 14 includes a display that is configured todisplay various information thereon. The printing execution unit 16includes a printing mechanism using one of an inkjet method and a lasermethod. The scanning execution unit 18 includes a scanning mechanismusing one of a charge-coupled device (“CCD”) and a contact image sensor(“CIS”).

The NFC I/F 20 is configured to allow the controller 30 to performwireless communication using the NFC wireless communication protocol. Inthis illustrative embodiment, the NFC wireless communication protocolmay be a wireless communication method for performing wirelesscommunication in compliance with the International standard, e.g.,ISO/IEC 21481 or ISO/IEC 18092.

The wireless LAN I/F 22 is configured to allow the controller 30 toperform wireless communication using the Wi-Fi® wireless communicationprotocol. In this illustrative embodiment, the Wi-Fi® wirelesscommunication protocol may be a wireless communication method forperforming wireless communication in compliance with the standard IEEE(The Institute of Electrical and Electronics Engineers, Inc.) 802.11 andits family standards (e.g., 802.11a, 802.11b, 802.11g, and 802.11n). Thecontroller 30 is capable of performing communication using the Wi-Fi®wireless communication protocol via the wireless LAN I/F 22. Morespecifically, the controller 30 is capable of performing communicationusing the Wi-Fi® wireless communication protocol via the wireless LANI/F 22 through the use of a wireless network using Wi-Fi Direct™ (“WFD”)(Wi-Fi Direct™ is a certification mark owned by the Wi-Fi Alliance ofAustin, Tex.) (hereinafter, a wireless network using Wi-Fi Direct™ isreferred to as “WFDNW”).

Dissimilarities between the NFC I/F 20 and the wireless LAN I/F 22 willbe described below. A communication speed (e.g., a maximum communicationspeed is 11 to 600 Mbps) of wireless communication via the wireless LANI/F 22 may be faster than a communication speed (e.g., a maximumcommunication speed is 100 to 424 kbps) of wireless communication usingthe NFC I/F 20. A frequency (e.g., 2.4 GHz band or 5.0 GHz band) of acarrier in wireless communication using the wireless LAN I/F 22 may alsodiffer from a frequency (e.g., 13.56 MHz band) of a carrier in wirelesscommunication using the NFC I/F 20. The controller 30 is allowed toperform wireless communication using the NFC wireless communicationprotocol between the MFP 10 and an external device (e.g., the mobileterminal PT1) via the NFC I/F 20 in a situation where a distance betweenthe MFP 10 and the external device is shorter than or equal toapproximately 10 cm. The controller 30 is allowed to perform wirelesscommunication between the MFP 10 and the external device via thewireless LAN I/F 22, in a situation where the distance between the MFP10 and the external device is longer than, shorter than or equal toapproximately 10 cm (e.g., a maximum communicable distance isapproximately 100 m). That is, a maximum distance that the MFP 10 cancommunicate with the external device wirelessly via the wireless LAN I/F22 is longer than a maximum distance that the MFP 10 can communicatewith the external device wirelessly via the NFC I/F 20.

The controller 30 includes a central processing unit (“CPU”) 32 and amemory 34. The CPU 32 includes a processor that executes variousprocesses in accordance with a program 36 (e.g., instructions) stored inthe memory 34. The memory 34 further stores therein Secure Function Lock(“SFL”) setting information 38 and an SFL table 40. The SFL settinginformation 38 indicates one of “ON” and “OFF” that is designated by theuser. When the CPU 32 receives an execution request from another devicevia the NFC I/F 20 in a state where the SFL setting information 38indicates “ON”, the CPU 32 receives SFL authentication information(e.g., a user ID and a password) from the another device and determineswhether the received SFL authentication information is listed on the SFLtable 40 (i.e., The authentication information is correct). When the CPU32 receives an execution request from the another device via the NFC I/F20 in a state where the SFL setting information 38 indicates “OFF”, theCPU 32 does not execute authentication. Hereinafter, the state where theSFL setting information 38 indicates “ON” is also referred as to “theSFL is “ON”” and the state where the SFL setting information 38indicates “OFF” is also referred to as “the SFL is “OFF””.

The SFL table 40 includes a plurality pieces of combined information,each of which include, for example, a user ID (e.g., “U1”), a password(e.g., “P1”), availability information for printing function (e.g., “OK”or “NG”), and availability information for scanning function (e.g., “OK”or “NG”) which are associated with each other. As used herein, “NG” isintended to mean “not good” or “no go” as known in the art. Theplurality pieces of combined information are provided for a plurality ofmobile terminals (e.g., the mobile terminals PT1, PT2, and PT3),respectively. In each combined information, the user ID identifies auser of a mobile terminal. The password is associated with the user ID.The availability information for printing function indicates whether theprinting function is available to the user. The availability informationfor scanning function indicates whether the scanning function isavailable to the user. In the SFL table 40, “OK” indicates that aparticular function is available to a particular user and “NG” indicatesthat a particular function is not available to a particular user. TheSFL table 40 is prestored in the memory 34 by a person responsible formaintain the MFP 10. For example, the SFL table 40 depicted in FIG. 1includes combined information in which “USER ID=U1”, “PASSWORD=P1”,“PRINTING=NG”, and “SCANNING=OK” are associated with each other.

The memory 34 further includes a network storage area. The networkstorage area stores information relating to a WFDNW configured by theMFP 10. The MFP 10 is configured to serve as a master in the WFDNW(i.e., as a Group Owner in the WFD wireless communication protocol).That is, the MFP 10 is capable of configuring a WFDNW in which the MFP10 itself serves as a master.

That is, the network storage area stores a wireless profile to be usedin the WFDNW configured by the MFP 10 and a management list. Thewireless profile includes a service set identifier (“SSID”), anauthentication method, an encryption method, and a password. Themanagement list may store therein one or more media access control(“MAC”) addresses of one or more devices serving as a slave in theWFDNW. That is, the management list is configured to store therein oneor more MAC addresses of one or more devices, each of which establisheswireless connection with the MFP 10 that serves as a master in theWFDNW.

Next, configurations of the mobile terminals PT1, PT2, and PT3 will befurther described with reference to FIG. 1. The mobile terminals PT1,PT2, and PT3 each may include a portable terminal device such as amobile phone (e.g., smartphone), a personal digital assistant (“PDA”), anotebook PC, a tablet PC, a mobile music player, and/or a mobile videoplayer.

Hereinafter, an example configuration of the mobile terminal PT1 will bedescribed. The mobile terminals PT2 and PT3 may have the sameconfiguration as the mobile terminal PT1. The mobile terminal PT1includes an operation unit 72, a display unit 74, an NFC I/F 80, awireless LAN I/F 82, and a controller 90, each of which are connectedwith a bus (reference numeral is omitted).

The operation unit 72 includes a plurality of keys. The user is allowedto input various instructions into the mobile terminal PT1 by operatingthe operation unit 72. The display unit 74 includes a display that isconfigured to display various information thereon. The NFC I/F 80 andthe wireless LAN I/F 82 have the similar configuration as the NFC I/F 20and the wireless LAN I/F 22, respectively, of the MFP 10. That is, themobile terminal PT1 is configured to perform selectively bothcommunication using the NFC wireless communication protocol andcommunication using the Wi-Fi® wireless communication protocol.

The controller 90 includes a CPU 92 and a memory 94. The CPU 92 includesa processor that executes various processes in accordance with a program96 or an application 98 (e.g., instructions) stored in the memory 94.

The operation system (“OS”) program 96 is a program designed to enablethe mobile terminal PT1 to perform basic operations. The application 98is a program designed to enable the MFP 10 to execute a particularfunction, e.g., the printing function or the scanning function. Theapplication 98 is supplied by a vendor of the MFP 10, and may beinstalled on the mobile terminal PT1 from a server on the Internet orfrom a medium supplied with the MFP 10.

The memory 94 further stores therein a user ID (e.g., “U1”) thatidentifies the user of the mobile terminal PT1 and a password (e.g.,“P1”) that is associated with the user ID. Hereinafter, a combination ofthe user ID and the password may also be referred to as “SFLauthentication information”. During initial setting of the installedapplication 98, the user of the mobile terminal PT1 enters the user ID(e.g., “U1”) and password (e.g., “P1”) obtained in advance by operatingthe operation unit 72. For example, the user may obtain the user ID andpassword prestored in the memory 34 of the MFP 10 by notification fromthe person responsible for maintaining the MFP 10. The CPU 92 stores theentered user ID and password (e.g., SFL authentication information) inthe memory 94.

Likewise, a memory of the mobile terminal PT2 stores therein a user ID(e.g., “U2”) and a password (e.g., “P1”) of a user of the mobileterminal PT2, and a memory of the mobile terminal PT3 stores therein auser ID (e.g., “U3”) and a password (e.g., “P3”) of a user of the mobileterminal PT3.

Next, communication using the NFC wireless communication protocol willbe further described. Hereinafter, a device that includes an NFC I/F andis capable of performing communication using the NFC wirelesscommunication protocol (e.g., the MFP 10 and the mobile terminals PT1,PT2, and PT3) is referred to as an “NFC-enabled device”. Hereinafter, aReader mode and a Writer mode are collectively referred to as an “R/Wmode”.

Among NFC-enabled devices, there is a device in which the NFC I/F iscapable of operating selectively in accordance with one of all the threemodes of a P2P mode, an R/W mode, and a Card Emulation (CE) mode, andanother device in which the NFC I/F is capable of operating selectivelyin accordance with one of one or two of the three modes. In theillustrative embodiment, the NFC I/F 20 of the MFP 10 and each of theNFC I/Fs 80 of the mobile terminals PT1, PT2, and PT3 are capable ofoperating selectively in accordance with one of all the above-describedthree modes. Hereinafter, for example, a situation in which an NFC I/Fof an NFC-enabled device operates in accordance with the P2P mode isalso referred to as “an NFC-enabled device operates in the P2P mode” or“the P2P mode is active in an NFC-enabled device”.

The P2P mode provides two-way communication between NFC-enabled devicesin a pair. It is assumed that the P2P mode is active in both of a firstNFC-enabled device and a second NFC-enabled device. In this case, acommunication link appropriate for the P2P mode (hereinafter, referredto as a “P2P communication link”) is established between the firstNFC-enabled device and the second NFC-enabled device. Under thissituation, for example, the first NFC-enabled device transmits firstpredetermined data to the second NFC-enabled device via the P2Pcommunication link. Then, the second NFC-enabled device transmits secondpredetermined data to the first NFC-enabled device via the same P2Pcommunication link. Thus, two-way communication is implemented. AnNFC-enabled device that is compliant with ISO/IEC 1443 Type A defined bythe NFC Forum and an NFC-enabled device that is compliant with ISO/IEC18092 Type F defined by the NFC Forum are both capable of using the P2Pmode. Nevertheless, an NFC-enabled device that is compliant with ISO/IEC1443 Type B defined by the NFC Forum is not capable of using the P2Pmode.

The R/W mode and the CE mode both provide one-way communication betweenNFC-enabled devices in a pair. The CE mode enables an NFC-enabled deviceto operate as a “card” in a form defined by the NFC Forum. TheNFC-enabled device of Type A, the NFC-enabled device of Type F, and theNFC-enabled device of Type B are capable of using the CE mode. TheReader mode enables an NFC-enabled device to read data from anotherNFC-enabled device that operates in the CE mode as a card. The Writermode enables an NFC-enabled device to write data in another NFC-enableddevice that operates in the CE mode as a card. The Reader mode alsoenables an NFC-enabled device to read data from an NFC-compliant card(e.g., the identification card 100). The Writer mode also enables anNFC-enabled device to write data in the NFC-compliant card.

For example, in one scenario, the Reader mode is active in the firstNFC-enabled device and the CE mode is active in the second NFC-enableddevice. In this case, a communication link appropriate for the Readermode and the CE mode is established between the first NFC-enabled deviceand the second NFC-enabled device. Under this situation, the firstNFC-enabled device performs an operation for reading data from a pseudocard in the second NFC-enabled device via the communication link toreceive the data from the second NFC-enabled device.

In another example, if the Writer mode is active in the firstNFC-enabled device and the CE mode is active in the second NFC-enableddevice, a communication link appropriate for the Writer mode and the CEmode is established between the first NFC-enabled device and the secondNFC-enabled device. Under this situation, the first NFC-enabled deviceperforms an operation for writing data into the pseudo card in thesecond NFC-enabled device via the communication link to transmit thedata to the second NFC-enabled device.

As described above, various combinations of the modes are available toperform communication using the NFC wireless communication protocolbetween NFC-enabled devices in a pair. For example, for the combinationsof the modes in the pair of NFC-enabled devices, the following fivepatterns are available: a “P2P mode and P2P mode” pair, a “Reader modeand CE mode” pair, a “Writer mode and CE mode” pair, a “CE mode andReader mode” pair, and a “CE mode and Writer mode” pair.

Hereinafter, for example, a communication link established between theMFP 10 that operates in the R/W mode and the mobile terminal PT1 thatoperates in the CE mode is also referred to as an “MFP 10 (R/W)-mobileterminal PT1 (CE) communication link”.

The NFC-enabled devices are configured to establish therebetween acommunication link appropriate for an active mode but not configured toestablish therebetween a communication link appropriate for an inactivemode. For example, when the CE mode is active and the P2P mode and theR/W mode are inactive in the MFP 10, the MFP 10 is allowed to establisha communication link for enabling the MFP 10 to operate in the CE mode.Nevertheless, the MFP 10 is not allowed to establish anothercommunication link (e.g., a communication link for enabling the MFP 10to operate in the inactive P2P mode, the inactive Reader mode, or theinactive Writer mode).

In the illustrative embodiment, as the power of the MFP 10 is turned on,the NFC I/F 20 changes its state to an initial state where the P2P modeand the R/W mode are active and the CE mode is inactive. While the powerof the MFP 10 is on, the MFP 10 operates with the NFC I/F 20 having theinitial state.

Next, the WFD will be described. The WFD is a standard created by theWi-Fi Alliance and is specified in the “Wi-Fi Peer-to-Peer (P2P)Technical Specification Version 1.1” drafted by the Wi-Fi Alliance.

Hereinafter, a device that is capable of performing wirelesscommunication in compliance with the WFD wireless communication protocol(e.g., the MFP 10) is referred to as a “WFD-enabled device”. The WFDstandard defines three statuses of the WFD-enabled device: a group owner(“G/O”) status, a client (“CL”) status, and a device status. TheWFD-enabled device is configured to operate selectively in one of thethree statuses.

A WFD-enabled device having the G/O status (hereinafter, also referredto as a “G/O-status device”) is configured to configure a wirelessnetwork (e.g., a WFDNW) in which the WFD-enabled device serves as amaster. A WFD-enabled device having the CL status (hereinafter, alsoreferred to as a “CL-status device”) serves as a slave in the WFDNW. AWFD-enabled device having the device status (hereinafter, also referredto as a “device-status device”) does not belong in the WFDNW.

A situation in which both a G/O-status device and a CL-status devicebelong in the same WFDNW is established, for example, by one of thefollowing procedures. Hereinafter, the situation in which both aG/O-status device and a CL-status device belong in the same WFDNW isalso referred to as a “belonging situation”. According to a firstprocedure, device-status devices in a pair execute a G/O negotiationwhich is wireless communication. Through the G/O negotiation, it isdetermined that one of the device-status devices changes its state tothe G/O status (i.e., becomes a G/O-status device) and the other changesits state to the CL status (i.e., becomes a CL-status device). Then, thedevice serving as the G/O-status device configures a WFDNW to establishwireless connection with the device serving as the CL-status device.Thus, the situation in which both the G/O-status device and theCL-status device belong in the same WFDNW (e.g., the belongingsituation) is established.

According to a second procedure, one of device-status devices in a pairchanges to the G/O status voluntarily to configure a WFDNW withoutperforming a G/O negotiation with the other of the device-statusdevices. In this case, after one of the device-status devices becomes aG/O-status device and configure the WFDNW, the other of thedevice-status devices changes to the CL status without performing a G/Onegotiation with the G/O-status device and establishes wirelessconnection with the G/O-status device. Thus, the situation in which boththe G/O-status device and the CL-status device belong in the same WFDNW(e.g., the belonging situation) is established. In the illustrativeembodiment, under a predetermined situation (e.g., NO in step S12 inFIG. 2 or YES in step S38 in FIG. 3), the MFP 10 changes to the G/Ostatus voluntarily to configure a WFDNW without performing a G/Onegotiation (e.g., step S14 in FIG. 2 or step S40 in FIG. 3) inaccordance with the second procedure.

The G/O-status device does not require any relay device for performingwireless communication of target data with the CL-status device. Thetarget data includes information on a network layer of an Open SystemInterconnection (“OSI”) reference model, and information on a layer(e.g., the application layer) higher than the network layer in the OSIreference model. The target data may include, for example, print datarepresenting an image of a print target. The G/O-status device is alsoconfigured to relay wireless communication between CL-status devices ina pair that transmit target data therebetween. As described above, thedevices belonging in the same WFDNW are capable of performing wirelesscommunication of target data therebetween by bypassing an access point(“AP”) that is provided separately from the devices. That is, the WFDwireless communication protocol is a system for wireless communicationnot using the AP.

The G/O-status device is configured to not perform wirelesscommunication of target data with a device-status device that does notbelong in the WFDNW in which the G/O-status device belongs.Nevertheless, the G/O-status device is configured to establish wirelessconnection with the device-status device by performing wirelesscommunication of data for establishing connection, with thedevice-status device. With the establishment of the wireless connectiontherebetween, the G/O-status device permits the device-status device toparticipate in the WFDNW.

The G/O-status device is further configured to establish wirelessconnection with a legacy device that does not belong in the WFDNW inwhich the G/O-status device belongs by performing wireless communicationof data for establishing connection, with the legacy device. With theestablishment of the wireless connection therebetween, the G/O-statusdevice permits the legacy device to participate in the WFDNW. The legacydevice does not support the WFD system but is configured to establishwireless connection with, for example, an AP, using the Wi-Fi® system.In the illustrative embodiment, the mobile terminals PT1, PT2, and PT3may be legacy devices.

The data for establishing connection includes information on a lowerlayer (e.g., a physical layer or a data link layer) underlying thenetwork layer in the OSI reference model, that is, the data forestablishing connection does not include information on the networklayer. More specifically, there are two types of data for establishingconnection: data for establishing WFD connection that includes specificdata that is specific to the WFD system and data for establishing normalconnection that does not include such specific data.

The data for establishing normal connection includes, for example, aProbe Request/Response, an Authentication Request/Response, anAssociation Request/Response, data for a Wi-Fi Simple Configuration(“WSC”) Exchange, and data for a four-way handshake. The Probe Requestis a signal for searching a device serving as a master in a wirelessnetwork (e.g., a G/O-status device or an AP). The Probe Response is aresponse signal in response to the Probe Request. The AuthenticationRequest is a signal for confirming an authentication method. TheAuthentication Response is a response signal in response to theAuthentication Request. The Association Request is a signal forrequesting establishment of connection. The Association Response is aresponse signal in response to the Association Request. The data for theWSC Exchange is a signal for providing various information, e.g., apassword. The data for the four-way handshake is a signal for executingauthentication.

In addition to the data for establishing normal connection, the data forestablishing WFD connection further includes, for example, an InvitationRequest/Response and a Provision Discovery Request/Response that are thespecific data that is specific to the WFD system. The Invitation Requestis a signal for requesting a device-status device to participate in aWFDNW. The Invitation Response is a response signal in response to theInvitation Request. The Provision Discovery Request is signal forconfirming a method (e.g., one of a Push-Button Method and a PIN Method)of Wi-Fi Protected Setup™ (“WPS”) (Wi-Fi Protected Setup™ is a trademarkowned by the Wi-Fi Alliance of Austin, Tex.). The Provision DiscoveryResponse is a response signal in response to the Provision DiscoveryRequest.

Generally, the data for establishing normal connection is used forestablishing wireless connection between a legacy device and an AP. Thatis, the legacy device performs, with the AP, wireless communication ofdata for establishing normal connection to establish wireless connectiontherebetween. By doing so, the legacy device is permitted to participatein a wireless network configured by the AP, as a station Likewise, thelegacy device performs, with a G/O-status device, wireless communicationof data for establishing normal connection to establish wirelessconnection therebetween. By doing so, the legacy device is permitted toparticipate in the WFDNW in which the G/O-status device belongs, as astation.

A device-status device (i.e., a device that supports the WFD system)performs, with the G/O-status device, wireless communication ofappropriate one of data for establishing normal connection and data forestablishing WFD connection, according to the circumstances, toestablish wireless connection therebetween. By doing so, thedevice-status device is permitted to participate in the WFDNW. In a casewhere the device-status device performs wireless communication of datafor establishing normal connection, the device-status deviceparticipates in the WFDNW, as a station, because the device-statusdevice does not perform wireless communication of specific data that isspecific to the WFD system. In a case where the device-status deviceperforms wireless communication of data for establishing WFD connection,the device-status device participates in the WFDNW, as a CL-statusdevice.

As described above, the device-status device may participate in theWFDNW, as one of a station and as a CL-status device. Hereinafter, boththe station and the CL-status device are referred to as a “slave”.

Referring to FIG. 2, a detail of a communication process executed by theCPU 32 of the MFP 10 will be further described. As described above, inthe first illustrative embodiment, as the power of the MFP 10 is turnedon, the NFC I/F 20 operates in the state where the P2P mode and the R/Wmode are active and the CE mode is inactive. The communication processof FIG. 2 starts upon establishment of a P2P communication link betweenthe MFP 10 and a mobile terminal (e.g., the mobile terminal PT1).Hereinafter, the mobile terminal that establishes the P2P communicationlink with the MFP 10 is referred to as a “target terminal”. At the timeof starting the communication process of FIG. 2, the MFP 10 serves as adevice-status device that does not belong in any WFDNW.

When a user of a target terminal requests the MFP 10 to execute aparticular function, e.g., the printing function, the user performs anoperation for starting the application 98 for the MFP 10 (see FIG. 1)and an operation for instructing execution of the particular function,on the target terminal. In response to the execution of the aboveoperations, an NFC I/F of the target terminal (e.g., the NFC I/F 80 ofthe mobile terminal PT1) starts operating in a state where the P2P modeis active (e.g., “ON”) and the R/W mode and the CE mode are inactive(e.g., “OFF”). Then, the user brings the target terminal closer to theMFP 10. As a distance between the NFC I/F of the target terminal and theNFC I/F 20 of the MFP 10 becomes a certain distance or shorter in whichcommunication using the NFC system can be performed therebetween (e.g.,approximately 10 cm), a P2P communication link is established betweenthe NFC I/F of the target terminal and the NFC I/F 20 of the MFP 10. Inthis case, the target terminal transmits, to the MFP 10, an executionrequest for execution of the particular function using the P2Pcommunication link. The execution request includes informationindicating the particular function that is requested to be executed butnot include the user ID of the target terminal.

When the P2P communication link is established between the targetterminal and the MFP 10, the CPU 32 of the MFP 10 starts thecommunication process of FIG. 2. In step S10, the CPU 32 receives anexecution request from the target terminal using the P2P communicationlink (e.g., via the NFC I/F 20).

In step S12, the CPU 32 determines whether the SFL setting information38 indicates “ON” with reference to the SFL setting information 38stored in the memory 34. When the CPU 32 determines that the SFL settinginformation 38 indicates “ON”, the CPU 32 makes a positive determination(e.g., YES) in step S12, and the routine proceeds to step S20. In stepS20, the CPU 32 executes an SFL authentication process (see FIG. 3).When the CPU 32 determines that the SFL setting information 38 indicates“OFF”, the CPU 32 makes a negative determination (e.g., NO) in step S12,and the routine proceeds to step S14.

In step S14, the CPU 32 changes the operating status of the MFP 10 fromthe device status to the G/O status. Thus, the MFP 10 starts operatingin the G/O-status device. That is, a WFDNW in which the MFP 10 serves asa master is configured. The CPU 32 prepares a wireless profile to beused in the WFDNW. More specifically, the CPU 32 generates a uniqueSSID. The CPU 32 further generates a password, for example, by selectingcharacters randomly. The CPU 32 further prepares a predeterminedauthentication method and encryption method. The CPU 32 stores theprepared wireless profile in the memory 34.

In step S16, the CPU 32 transmits a Response signal including the SSIDand password generated in step S14 to the target terminal using the P2Pcommunication link, thereby notifying the target terminal to establishwireless connection with the MFP 10 using the SSID and password includedin the Response signal.

In step S18, the CPU 32 executes processing for establishing wirelessconnection in conjunction with the target terminal using the SSID andpassword generated in step S14, to establish wireless connectiontherebetween. More specifically, the CPU 32 receives a Probe Requestfrom the target terminal and transmits a Probe Response to the targetterminal in response to the Probe Request. The Probe Request includesthe SSID that is provided to the target terminal in step S16 in FIG. 2.The Probe Response includes the authentication method and encryptionmethod stored in the memory 34 in step S14 in FIG. 2. Through thetransmission of the Probe Response, the CPU 32 notifies the targetterminal to use the provided authentication method and encryptionmethod. Subsequent to this, the CPU 32 receives an AuthenticationRequest and an Association Request sequentially from the target terminaland transmits an Authentication Response and an Association Responsesequentially to the target terminal in response to the AuthenticationRequest and the Association Request, respectively. Then, the CPU 32executes a four-way handshake with the target terminal.

Upon completion of the above processing, wireless connection isestablished between the MFP 10 and the target terminal. Thus, the CPU 32permits the target terminal to participate in the WFDNW configured instep S14, as a slave (more specifically, as a station). The CPU 32 thuslists a MAC address of the target terminal in the management list,whereby a belonging situation in which both the MFP 10 and the targetterminal belong in the same WFDNW is established. Subsequent to theestablishment of the belonging situation, the CPU 32 performs wirelesscommunication of target data (e.g., print data) with the target terminalusing the WFDNW via the wireless LAN I/F 22. Upon completion of theprocessing in step S18, the CPU 32 ends the communication process ofFIG. 2. After the wireless communication of target data is performedtherebetween, the CPU 32 determines whether the particular functionrequested by the user of the target terminal is available to the userwith reference to the SFL table 40. When the CPU 32 determines that theparticular function is available to the user, the CPU 32 executes theparticular function.

Referring to FIG. 3, a detail of the SFL authentication process executedin step S20 in FIG. 2 will be further described. In a case where the CPU32 receives the execution request from the target terminal using the P2Pcommunication link established between the MFP 10 and the targetterminal (e.g., step S10 in FIG. 2), when the CPU 32 determines that theSFL setting information 38 indicates “ON” (e.g., YES in step S12 in FIG.2), the CPU 32 starts the SFL authentication process of FIG. 3.

In step S30, the CPU 32 transmits a Response signal to the targetterminal using the P2P communication link. The Response signal includesinformation indicating that the CPU 32 cannot execute user IDauthentication (hereinafter, referred to as “NG information”) because nouser ID is included in the execution request received in step S10 inFIG. 2.

In step S32, the CPU 32 transmits a Deactivation signal to the targetterminal using the P2P communication link. The Deactivation signal is asignal for requesting disconnection of the established P2P communicationlink.

In response to the Deactivation signal, the target terminal transmits anOK signal to the MFP 10 using the P2P communication link. Thus, the P2Pcommunication link established between the MFP 10 and the targetterminal is disconnected.

In step S34, the CPU 32 monitors establishment of an MFP 10 (R/W)-targetterminal (CE) communication link.

As the P2P communication link is disconnected, the target terminalchanges the state of the NFC I/F to a state in which the CE mode isactive and the other modes are inactive from the state in which the P2Pmode is active and the other modes are inactive (e.g., step S66 in FIG.4). While the user of the target terminal holds the target terminal at aposition within the range in which the target terminal can performcommunication using the NFC system with the MFP 10 (e.g., withinapproximately 10 cm from the MFP 10), an MFP 10 (R/W)-target terminal(CE) communication link is established between the NFC I/F of the targetterminal and the NFC I/F 20 of the MFP 10.

As the MFP 10 (R/W)-target terminal (CE) communication link isestablished, the CPU 32 makes a positive determination (e.g., YES) instep S34, and the routine proceeds to step S36. In step S36, the CPU 32receives SFL authentication information (e.g., the user ID (e.g., “U1”)and the password (e.g., “P1”) of the user of the mobile terminal PT1)from the target terminal using the established R/W-CE communicationlink. More specifically, in step S36, the CPU 32 reads the SFLauthentication information from the NFC I/F of the target terminal inwhich the SFL authentication information are written, using theestablished R/W-CE communication link, and obtains the read SFLauthentication information via the NFC I/F 20.

In step S38, the CPU 32 executes authentication using the SFLauthentication information obtained in step S36 and determines whetherthe authentication is successful. More specifically, in step S38, theCPU 32 determines whether the combined information including the SFLauthentication information (e.g., the user ID and the password) obtainedin step S36 is included in the SFL table 40 (see FIG. 1). When the CPU32 determines that the combined information including the SFLauthentication information (e.g., the user ID and the password) obtainedin step S36 is included in the SFL table 40, the CPU 32 makes a positivedetermination (e.g., YES) in step S38 (e.g., the authentication issuccessful), and the routine proceeds to step S40. When the CPU 32determines that the combined information including the SFLauthentication information (e.g., the user ID and the password) obtainedin step S36 is not included in the SFL table 40, the CPU 32 makes anegative determination (e.g., NO) in step S38 (e.g., the authenticationis failed), and the routine proceeds to step S46. The processing of stepS38 may be an example of the situation in which “the authenticationinformation is correct”.

In step S40, the CPU 32 changes the operating status of the MFP 10 fromthe device status to the G/O status. Thus, the MFP 10 starts serving asa G/O-status device. That is, a WFDNW in which the MFP 10 serves as amaster is configured. Similar to the processing in step S14 in FIG. 2,the CPU 32 prepares a wireless profile to be used in the WFDNW (e.g., anSSID, a password, an authentication method, and an encryption method)and stores the prepared wireless profile in the memory 34.

In step S42, the CPU 32 transmits the SSID and password generated instep S40 to the target terminal using the MFP 10 (R/W)-target terminal(CE) communication link. More specifically, the CPU 32 writes the SSIDand the password into the NFC I/F of the target terminal, therebynotifying the target terminal to establish wireless connection with theMFP 10 using the SSID and password written in the NFC I/F of the targetterminal. The transmission of the SSID and the password in step S42 isexecuted in response to the execution request received in step S10 inFIG. 2. That is, in step S42, the CPU 32 transmits the SSID and thepassword to the target terminal without receiving again a request fortransmission of the SSID and the password from the target terminal.

In step S44, the CPU 32 executes wireless processing for establishingwireless connection in conjunction with the target terminal using theSSID and password generated in step S14, to establish wirelessconnection therebetween. The processing for establishing wirelessconnection executed in step S44 may be substantially the same as theprocessing for establishing wireless connection executed in step S18 inFIG. 2 described above, and therefore, a detailed description of theprocessing for establishing wireless connection executed in step S44will be omitted. Through the processing for establishing wirelessconnection, the CPU 32 permits the target terminal to participate in theWFDNW configured in step S40, as a slave (more specifically, as astation). The CPU 32 thus lists a MAC address of the target terminal inthe management list. Accordingly, a belonging situation in which boththe MFP10 and the target terminal belong in the same WFDNW isestablished. Subsequent to the establishment of the belonging situation,the CPU 32 performs wireless communication of target data (e.g., printdata) with the target terminal using the WFDNW via the wireless LAN I/F22. Upon completion of the processing in step S44, the CPU 32 ends theSFL authentication process of FIG. 3 and the communication process ofFIG. 2. As described above, subsequent to the performance of wirelesscommunication of the target data between the MFP 10 and the targetterminal, the CPU 32 determines whether the particular functionrequested by the user of the target terminal is available to the userwith reference to the SFL table 40. When the CPU 32 determines that theparticular function is available to the user, the CPU 32 executes theparticular function.

In step S46, the CPU 32 transmits a predetermined NG notification to thetarget terminal using the MFP 10 (R/W)-target terminal (CE)communication link. The NG notification indicates that theauthentication is failed. In this case, wireless connection is notestablished between the MFP 10 and the target terminal. Upon completionof the processing in step S46, the CPU 32 ends the SFL authenticationprocess of FIG. 3 and the communication process of FIG. 2.

Upon receipt of one of the Response signal including the SSID and thepassword (e.g., step S42) and the NG notification (e.g., step S46), theNFC I/F of the target terminal returns to the state in which the P2Pmode is active and the other modes are inactive from the state in whichthe CE mode is active and the other modes are inactive (e.g., step S74or S88 in FIG. 4). Thus, the MFP 10 (R/W)-target terminal (CE)communication link is disconnected. That is, in the illustrativeembodiment, the MFP 10 (R/W)-target terminal (CE) communication link isdisconnected at a predetermined timing subsequent to step S42 or S46.

Referring to FIG. 4, a detail of a function execution process executedby the CPU 92 of the mobile terminal PT1 will be described. The mobileterminals PT2 and PT3 are also configured to execute the same functionexecution process as the mobile terminal PT1 executes.

When the user of the mobile terminal PT1 requests the MFP 10 to executea particular function, e.g., the printing function, of the MFP 10, theuser performs the operation for starting the application 98(hereinafter, referred to as an “application startup operation”) andthen the operation for instructing execution of the particular function(hereinafter, referred to as an “execution instruction operation”) byoperating the operation unit 72 of the mobile terminal PT1. For example,when the execution instruction operation is a printing-executioninstruction operation for instructing execution of printing, theexecution instruction operation includes an operation for designatingprint data that represents a print target image from the memory 94 ofthe mobile terminal PT1.

Upon execution of the execution instruction operation, the NFC I/F 80 ofthe mobile terminal PT1 starts operating in a state where the P2P modeis active (e.g., “ON”) and the R/W mode and the CE mode are inactive(e.g., “OFF”). Then, the user brings the mobile terminal PT1 closer tothe MFP 10. As a distance between the NFC I/F 80 of the mobile terminalPT1 and the NFC I/F 20 of the MFP 10 becomes a certain distance orshorter in which communication using the NFC system can be performedtherebetween (e.g., approximately 10 cm), a P2P communication link isestablished between the NFC I/F 80 of the mobile terminal PT1 and theNFC I/F 20 of the MFP 10. The function execution process of FIG. 4starts upon establishment of a P2P communication link between the mobileterminal PT1 and the MFP 10.

In step S60, the CPU 92 transmits, to the MFP 10, using the establishedP2P communication link, an execution request for execution of theparticular function requested to be executed through the executioninstruction operation. The execution request includes informationindicating the particular function that is requested to be executed butnot include the user ID of the mobile terminal PT1.

In step S62, the CPU 92 monitors receipt of a Response signal includingNG information (e.g., step S30 in FIG. 3) from the MFP 10 using the P2Pcommunication link. In step S80, the CPU 92 monitors receipt of aResponse signal including the SSID and the password (e.g., step S14 inFIG. 2) from the MFP 10 using the P2P communication link.

When the MFP 10 receives a Response signal including NG information, theCPU 92 makes a positive determination (e.g., YES) in step S62, and theroutine proceeds to step S64.

When the MFP 10 receives a Response signal including the SSID and thepassword, the CPU 92 makes a positive determination (e.g., YES) in stepS80, and the routine proceeds to step S82. In step S82, the CPU 92executes processing for establishing wireless connection in conjunctionwith the MFP 10 using the received SSID and password, to establishwireless connection therebetween. The processing for establishingwireless connection executed in step S82 may be substantially the sameas the processing for establishing wireless connection executed in stepS18 in FIG. 2 described above. The processing executed in step S82 bythe CPU 92 may be substantially the same as the processing executed instep S18 in FIG. 2 by the target terminal. Upon completion of theprocessing for establishing wireless connection, wireless connection isestablished between the mobile terminal PT1 and MFP 10. Thus, the mobileterminal PT1 is permitted to participate in the WFDNW in which the MFP10 serves as a G/O-status device (e.g., the WFDNW configured in step S14in FIG. 2), as a slave (more specifically, as a station), whereby abelonging situation in which both the MFP10 and the target terminalbelong in the same WFDNW is established. Subsequent to the establishmentof the belonging situation, the CPU 92 performs wireless communicationof target data (e.g., print data) with the target terminal using theWFDNW via wireless LAN I/F 82. Upon completion of the processing in stepS82, the CPU 92 ends the function execution process of FIG. 4.

In step S64, the CPU 92 receives a Deactivation signal from the MFP 10using the P2P communication link. In response to the Deactivationsignal, the CPU 92 transmits an OK signal to the MFP 10 using the P2Pcommunication link. Thus, the P2P communication link established betweenthe MFP 10 and the mobile terminal PT1 is disconnected.

In step S66, the CPU 92 changes the state of the NFC I/F 80 from thestate where the P2P mode is active (e.g., “ON”) and the other modes areinactive (e.g., “OFF”) to a state where the CE mode is active (e.g.,“ON”) and the other modes are inactive (e.g., “OFF”). More specifically,the CPU 92 ends the P2P mode and starts the CE mode. In step S68, theCPU 92 writes the SFL authentication information (e.g., the user ID(e.g., “U1”) and the password (e.g., “P1”)) into the NFC I/F 80.

In step S70, the CPU 92 monitors establishment of an MFP 10 (R/W)-mobileterminal PT1 (CE) communication link. While the user of the mobileterminal PT1 holds the mobile terminal PT1 at a position within therange in which the mobile terminal PT1 can perform communication usingthe NFC system with the MFP 10 (e.g., within approximately 10 cm fromthe MFP 10), an MFP 10 (R/W)-mobile terminal PT1 (CE) communication linkis established between the NFC I/F 80 of the mobile terminal PT1 and theNFC I/F 20 of the MFP 10. As the MFP 10 (R/W)-mobile terminal PT1 (CE)communication link is established, the CPU 92 makes a positivedetermination (e.g., YES) in step S70, and the routine proceeds to stepS72.

In step S72, the CPU 92 monitors receipt of an SSID and a password fromthe MFP 10 using the MFP 10 (R/W)-mobile terminal PT1 (CE) communicationlink.

As the MFP 10 (R/W)-mobile terminal PT1 (CE) communication link isestablished, the SFL authentication information written in the NFC I/F80 is read therefrom by the MFP 10 using the established communicationlink. The MFP 10 obtains the read SFL authentication information (e.g.,step S36 in FIG. 3). The MFP 10 then executes authentication using theread SFL authentication information (e.g., step S38 in FIG. 3). When theauthentication is successful (e.g., YES in step S38 in FIG. 3), the MFP10 starts serving as a G/O-status device and prepares a wireless profile(e.g., step S40 in FIG. 3). The MFP 10 transmits the SSID and thepassword to the mobile terminal PT1 using the MFP 10 (R/W)-mobileterminal PT1 (CE) communication link. When the authentication is failed(e.g., NO in step S38 in FIG. 3), the MFP 10 transmits an NGnotification to the mobile terminal PT1.

When the CPU 92 receives the SSID and the password from the MFP 10 usingthe MFP 10 (R/W)-mobile terminal PT1 (CE) communication link, the CPU 92makes a positive determination (e.g., YES) in step S72, and the routineproceeds to step S74. When the CPU 92 receives the NG notification fromthe MFP 10 using the MFP 10 (R/W)-mobile terminal PT1 (CE) communicationlink, the CPU 92 makes a negative determination (e.g., NO) in step S72,and the routine proceeds to step S86.

In step S74, the CPU 92 returns the state of the NFC I/F 80 from thestate where the CE mode is active (e.g., “ON”) and the other modes areinactive (e.g., “OFF”) to the state where the P2P mode is active (e.g.,“ON”) and the other modes are inactive (e.g., “OFF”). More specifically,the CPU 92 ends the CE mode and starts the P2P mode. Thus, the MFP 10(R/W)-target terminal (CE) communication link is disconnected.

In step S76, the CPU 92 executes processing for establishing wirelessconnection in conjunction with the MFP 10 using the received SSID andpassword, to establish wireless connection with the MFP 10. Theprocessing of step S74 and the processing of step S76 are independent ofeach other and are executed independently at respective predeterminedtimings subsequent to step S72. Therefore, the sequence of execution ofthe processing of step S74 and the processing of step S76 is not limitedto the above example. In other embodiments, for example, the processingof step S76 may be executed prior to the execution of the processing ofstep S74. The processing for establishing wireless connection executedin step S76 may be substantially the same as the processing forestablishing wireless connection executed in step S82. Upon completionof the processing for establishing wireless connection, the wirelessconnection is established between the mobile terminal PT1 and the MFP10. Thus, the mobile terminal PT1 is permitted to participate in theWFDNW in which the MFP 10 serves as a G/O-status device (e.g., the WFDNWconfigured in step S14 in FIG. 2), as a slave (more specifically, as astation), whereby a belonging situation in which both the MFP10 and thetarget terminal belong in the same WFDNW is established. Subsequent tothe establishment of the belonging situation, the CPU 92 performswireless communication of target data (e.g., print data) with the targetterminal in the WFDNW via wireless LAN I/F 82. Upon completion of theprocessing in step S76, the CPU 92 ends the function execution processof FIG. 4. After the wireless communication of target data is performedtherebetween, when the CPU 92 determines that the particular functionrequested by the user of the target terminal is available to the user,the CPU 92 can execute the particular function.

In step S86, the CPU 92 displays a predetermined error message on thedisplay unit 74. In this case, wireless connection is not establishedbetween the mobile terminal PT1 and the MFP 10. In step S88, the CPU 92returns the state of the NFC I/F 80 from the state where the CE mode isactive (e.g., “ON”) and the other modes are inactive (e.g., “OFF”) tothe state where the P2P mode is active (e.g., “ON”) and the other modesare inactive (e.g., “OFF”). Thus, the MFP 10 (R/W)-target terminal (CE)communication link is disconnected. Upon completion of the processing instep S88, the CPU 92 ends the function execution process of FIG. 4.

Referring to FIGS. 5 and 6, various example cases implemented by theflowcharts of FIGS. 2, 3, and 4 will be described.

Referring to FIG. 5, Case A1 will be described below. Examplecommunication that may be performed in Case A1 between the MFP 10 andthe mobile terminal PT1 when a P2P communication link is establishedtherebetween while the SFL indicates “ON” in the MFP 10 will bedescribed below.

As the power of the MFP 10 is turned on, the NFC I/F 20 starts operatingin the initial state where the P2P mode and the R/W mode are active(e.g., “ON”) and the CE mode is inactive (e.g., “OFF”). At this point,the MFP 10 serves as a device-status device that does not belong in anyWFDNW. As described above, in Case A1, the SFL of MFP 10 is “ON”.

The user of the mobile terminal PT1 performs an application startupoperation and an execution instruction operation for instructingexecution of a particular function sequentially by operating theoperation unit 72 of the mobile terminal PT1. In response to theperformance of the execution instruction operation, the NFC I/F 80 ofthe mobile terminal PT1 starts operating in a state where the P2P modeis active (e.g., “ON”) and the R/W mode and the CE mode are inactive(e.g., “OFF”).

Then, the user of the mobile terminal PT1 brings the mobile terminal PT1closer to the MFP 10. As a distance between the NFC I/F 80 of the mobileterminal PT1 and the NFC I/F 20 of the MFP 10 becomes a certain distanceor shorter in which communication using the NFC system can be performedtherebetween (e.g., approximately 10 cm), a P2P communication link isestablished between the NFC I/F 80 of the mobile terminal PT1 and theNFC I/F 20 of the MFP 10.

The CPU 92 of the mobile terminal PT1 transmits an execution request tothe MFP 10 using the established P2P communication link (e.g., via theNFC I/F 80) (e.g., step S60 in FIG. 4).

In Case A1, the SFL setting information 38 (see FIG. 1) indicates “ON”.Therefore, in response to the execution request (e.g., step S10 in FIG.2), the CPU 32 of the MFP 10 transmits a Response signal including NGinformation to the mobile terminal PT1 using the P2P communication link(e.g., YES in step S12 in FIG. 2 and step S30 in FIG. 3). Subsequent tothis, the CPU 32 transmits a Deactivation signal to the target terminalusing the P2P communication link (e.g., step S32 in FIG. 3).

In response to the Deactivation signal, the CPU 92 of the mobileterminal PT1 transmits an OK signal to the MFP 10 using the P2Pcommunication link (e.g., step S64 in FIG. 4). Thus, the P2Pcommunication link established between the MFP 10 and the targetterminal is disconnected. As the P2P communication link is disconnected,the CPU 92 changes the state of the NFC I/F 80 from the state where theP2P mode is active (e.g., “ON”) and the other modes are inactive (e.g.,“OFF”) to a state where the CE mode is active (e.g., “ON”) and the othermodes are inactive (e.g., “OFF”) (e.g., step S66 in FIG. 4). That is,the CPU 92 ends the P2P mode and starts the CE mode. Subsequent to this,the CPU 92 writes the SFL authentication information (e.g., the user ID(e.g., “U1”) and the password (e.g., “P1”)) into the NFC I/F 80.

Subsequent to the change of the state of the NFC I/F 80 of the mobileterminal PT1 to the state where the CE mode is active (e.g., “ON”) andthe other modes are inactive (e.g., “OFF”), an MFP 10 (R/W)-mobileterminal PT1 (CE) communication link is established between the NFC I/F80 of the MFP 10 and the NFC I/F 20 of the mobile terminal PT1 (e.g.,YES in step S34 in FIG. 3 and YES in step S70 in FIG. 4).

The CPU 32 of the MFP 10 receives the SFL authentication informationfrom the mobile terminal PT1 using the established R/W-CE communicationlink (e.g., step S36 in FIG. 3). Then, the CPU 32 executesauthentication using the received SFL authentication information (e.g.,the user ID (e.g., “U1”) and the password (e.g., “P1”)) (e.g., step S38in FIG. 3). As depicted in FIG. 1, the SFL table 40 includes thecombined information including “USER ID=U1” and “PASSWORD=P1”.Therefore, the CPU 32 determines that the authentication is successful(e.g., the CPU 32 makes a positive determination (e.g., YES) in step S38in FIG. 3).

The CPU 32 changes the operating status of the MFP 10 from the devicestatus to the G/O status (e.g., step S40 in FIG. 3). Thus, a WFDNW inwhich the MFP 10 serves as a G/O-status device (i.e., as a master) isconfigured. The CPU 32 prepares a wireless profile (e.g., an SSID, apassword, an authentication method, and an encryption method) to be usedin the WFDNW and stores the prepared wireless profile in the memory 34.

The CPU 32 transmits the SSID and password to be used in the WFD systemto the mobile terminal PT1 using the MFP 10 (R/W)-mobile terminal PT1(CE) communication link (e.g., step S42 in FIG. 3). The CPU 32 transmitsthe SSID and the password (e.g., step S42 in FIG. 3) in response to theexecution request (e.g., step S10 in FIG. 2). That is, the CPU 32transmits the SSID and the password to the target terminal withoutreceiving a request for transmission of the SSID and the password fromthe target terminal again.

In Case A1, upon receipt of the SSID and the password (e.g., YES in stepS72 in FIG. 4), the CPU 92 of the mobile terminal PT1 returns the stateof the NFC I/F 80 from the state where the CE mode is active (e.g.,“ON”) and the other modes are inactive (e.g., “OFF”) to the state wherethe P2P mode is active (e.g., “ON”) and the other modes are inactive(e.g., “OFF”) (e.g., step S74 in FIG. 4). More specifically, the CPU 92ends the CE mode and starts the P2P mode. Thus, the MFP 10 (R/W)-mobileterminal PT1 (CE) communication link is disconnected.

The CPU 92 executes processing for establishing wireless connection inconjunction with the CPU 32 of the MFP 10 using the received SSID andpassword, to establish wireless connection therebetween (e.g., step S76in FIG. 4 and step S44 in FIG. 3), whereby a belonging situation inwhich both the MFP10 and the mobile terminal PT1 belong in the sameWFDNW is established.

In a case where the execution instruction operation performed by theuser of the mobile terminal PT1 is a printing-execution requestoperation for requesting execution of printing, the CPU 92 transmitsprint data to the MFP 10 using the WFDNW (e.g., step S76 in FIG. 4 andstep S44 in FIG. 3) subsequent to the establishment of the belongingsituation.

As depicted in FIG. 1, in the SFL table 40, the combined informationincluding “USER ID=U1” and “PASSWORD=P1” further includes “PRINTING=NG”.Accordingly, in Case A1, the CPU 32 of the MFP 10 determines that theprinting function is not available to the user who is requesting theexecution of the printing function and therefore the CPU 32 does notperform the printing function.

In a case where the execution instruction operation performed by theuser of the mobile terminal PT1 is a scanning-execution requestoperation for requesting execution of scanning, the user of the mobileterminal PT1 is allowed to perform a scanning operation by operating theoperation unit 12 of the MFP 10 s subsequent to the establishment of thebelonging situation.

As depicted in FIG. 1, in the SFL table 40, the combined informationincluding “USER ID=U1” and “PASSWORD=P1” further includes “SCANNING=OK”.Accordingly, in Case A1, the CPU 32 of the MFP 10 determines that thescanning function is available to the user who is requesting theexecution of the scanning function and thus performs the scanningfunction. The CPU 32 transmits scan data to the mobile terminal PT1using the WFDNW (e.g., step S76 in FIG. 4 and step S44 in FIG. 3).

When the SFL table 40 does not include the combined informationincluding “USER ID=U1” and “PASSWORD=P1”, the CPU 32 of the MFP 10determines that the authentication is failed (e.g., the CPU 32 makes anegative determination (e.g., NO) in step S38 in FIG. 3). In this case,the CPU 32 transmits a predetermined NG notification to the targetterminal using the MFP 10 (R/W)-target terminal (CE) communication link.

Upon receipt of the NG notification, the CPU 92 of the mobile terminalPT1 displays a predetermined error message on the display unit 74 (e.g.,step S86 in FIG. 4). Then, the CPU 92 returns the state of the NFC I/F80 from the state where the CE mode is active (e.g., “ON”) and the othermodes are inactive (e.g., “OFF”) to the state where the P2P mode isactive (e.g., “ON”) and the other modes are inactive (e.g., “OFF”)(e.g., step S88 in FIG. 4). More specifically, the CPU 92 ends the CEmode and starts the P2P mode. Thus, the MFP 10 (R/W)-mobile terminal PT1(CE) communication link is disconnected. In this case, wirelessconnection is not established between the MFP 10 and the mobile terminalPT1.

According to Case A1 of the first illustrative embodiment, when the MFP10 receives an execution request from the mobile terminal PT1 using theP2P communication link (e.g., the NFC I/F 20) while the SFL is “ON”(e.g., step S10 in FIG. 2), the MFP 10 transmits a Response signalincluding NG information to the mobile terminal PT1 (e.g., step S30 inFIG. 3). Subsequent to this, as the MFP 10 receives SFL authenticationinformation (e.g., the user ID (e.g., “U1”) and the password (e.g.,“P1”)) from the mobile terminal PT1 using the R/W-CE communication link(e.g., via the NFC I/F 20) (e.g., step S36 in FIG. 3), the MFP 10executes authentication using the received user ID and password (e.g.,step S38 in FIG. 3). That is, the MFP 10 determines whether the combinedinformation including the received user ID and password is included inthe SFL table 40 (see FIG. 1). When the authentication is successful(e.g., YES in step S38 in FIG. 3), the MFP 10 changes its operatingstatus to the G/O status (e.g., step S40 in FIG. 3) and transmits, tothe mobile terminal PT1, using the R/W-CE communication link, the SSIDand password to be used in the WFDNW in which the MFP 10 serves as aG/O-status device (e.g., step S42 in FIG. 3). Subsequent to theestablishment of a belonging situation in which both the MFP10 and themobile terminal PT1 belong in the same WFDNW, the MFP 10 performswireless communication of target data (e.g., one of print data and scandata) with the mobile terminal PT1 using the WFDNW (e.g., via thewireless LAN I/F 22). When the authentication is failed (e.g., NO instep S38 in FIG. 3), the MFP 10 transmits an NG notification to themobile terminal PT1 using the R/W-CE communication link (e.g., step S46in FIG. 3). In this case, a belonging situation is not established. Thatis, in Case A1, the MFP 10 may determine whether wireless communicationof target data is performed with the mobile terminal PT1 using the WFDNWvia the wireless LAN I/F 22 in accordance with whether theauthentication is successful. Consequently, according to the MFP 10 ofthe first illustrative embodiment, communication using appropriate oneof the NFC I/F 20 and the wireless LAN I/F 22 may be performedselectively.

The MFP 10 receives the execution request from the mobile terminal PT1(e.g., step S10 in FIG. 2) and transmits a Response signal including NGinformation to the mobile terminal PT1, using the P2P communication linkestablished between the MFP 10 and the mobile terminal PT1 (e.g., stepS30 in FIG. 3). Subsequently, the MFP 10 receives the SFL authenticationinformation from the mobile terminal PT1 (e.g., step S36 in FIG. 3) andtransmits the SSID and the password to the mobile terminal PT1 (e.g.,step S42 in FIG. 3), using the MFP 10 (R/W)-mobile terminal PT1 (CE)communication link established after the P2P communication link isdisconnected. With this configuration, the MFP 10 may establish anappropriate communication link between the MFP 10 and the mobileterminal PT1, and transmits and receives various information between theMFP 10 and the mobile terminal PT1 appropriately.

In Case A1, subsequent to the disconnection of the P2P communicationlink, the mobile terminal PT1 changes the state of the NFC I/F 80 fromthe initial state where the P2P mode is active (e.g., “ON”) and theother modes (e.g., the R/W mode and the CE mode) are inactive (e.g.,“OFF”) to the state where CE mode is active (e.g., “ON”) and the othermodes (e.g., the R/W mode and the CE mode) are inactive (e.g., “OFF”).As described above, the mobile terminal PT1 may change the state of theNFC I/F 80 appropriately. In another example, if the state of the NFCI/F 80 is maintained in the initial state without being changed toanother state, there is a possibility that the mobile terminal PT1 maynot be able to transmit the SFL authentication information to the MFP 10appropriately. If such a situation happens, the user of the mobileterminal PT1 may need to perform an additional operation, e.g., acomplicated operation. In this regard, in Case A1 described above, themobile terminal PT1 changes the state of the NFC I/F 80 to anappropriate state after the P2P communication link is disconnected,whereby the mobile terminal PT1 may transmit the SFL authenticationinformation to the MFP 10 appropriately without requiring the user ofadditional performance of a complicated operation.

Upon receipt of the Response signal including the SSID and the password(e.g., YES in step S72 in FIG. 4), the mobile terminal PT1 returns thestate of the NFC I/F 80 from the state where the CE mode is active(e.g., “ON”) and the other modes are inactive (e.g., “OFF”) to the statewhere the P2P mode is active (e.g., “ON”) and the other modes areinactive (e.g., “OFF”) (e.g., step S74 in FIG. 4). That is, the mobileterminal PT1 may change the state of the NFC I/F 80 appropriatelyaccording to the circumstances.

Referring to FIG. 6, Case A2 will be described below. Examplecommunication that may be performed in Case A2 between the MFP 10 andthe mobile terminal PT1 when a P2P communication link is establishedtherebetween while the SFL is “OFF” (i.e., the SFL setting information38 indicates “OFF”) will be described.

Each processing executed before a P2P communication link is establishedbetween the MFP 10 and the mobile terminal PT1 in Case A2 may besubstantially the same as each processing executed before a P2Pcommunication link is established therebetween in Case A1.

The CPU 92 of the mobile terminal PT1 transmits an execution request tothe MFP 10 using the established P2P communication link (e.g., step S60in FIG. 4).

As described above, in Case A2, the SFL setting information 38 (seeFIG. 1) indicates “OFF”. Therefore, upon receipt of the executionrequest (e.g., step S10 in FIG. 2), the CPU 32 of the MFP 10 changes theoperating status of the MFP 10 from the device status to the G/O status(e.g., NO in step S12, and step S14 in FIG. 2). Thus, a WFDNW in whichthe MFP 10 serves as a G/O-status device is configured. The CPU 32prepares a wireless profile (e.g., an SSID, a password, anauthentication method, and an encryption method) to be used in the WFDNWand stores the prepared wireless profile in the memory 34.

Subsequent to this, the CPU 32 transmits, to the mobile terminal PT1, aResponse signal including the SSID and password to be used incommunication using the WFD system, via the P2P communication link(e.g., step S16 in FIG. 2).

Then, the CPU 92 of the mobile terminal PT1 executes processing forestablishing wireless connection in conjunction with the CPU 32 of theMFP 10 using the received SSID and password, to establish wirelessconnection therebetween (e.g., step S76 in FIG. 4 or step S18 in FIG.2). Thus, a belonging situation in which both the MFP10 and the mobileterminal PT1 belong in the same WFDNW is established.

In Case A2, the execution instruction operation performed by the user ofthe mobile terminal PT1 is a printing-execution instruction operationfor requesting execution of the printing function. Therefore, subsequentto the establishment of the belonging situation, the CPU 92 transmitsprint data to the MFP 10 in the WFDNW (e.g., step S76 in FIG. 4 and stepS18 in FIG. 2). Similar to Case A1, the CPU 32 of the MFP 10 determinesthat printing not available to the user who is requesting the executionof the printing function and thus does not perform the printingfunction.

In Case A2, subsequently to this, the P2P communication link establishedbetween the MFP 10 and the mobile terminal PT1 is disconnected in anarbitrary manner. For example, the CPU 32 of the MFP 10 may transmit aDeactivation signal to the mobile terminal PT1 to disconnect the P2Pcommunication link. In other embodiments, for example, the user of themobile terminal PT1 may move the mobile terminal PT1 away from the MFP10 out of the range in which the target terminal can performcommunication using the NFC system with the MFP 10, to disconnect theP2P communication link.

According to Case A2 of the first illustrative embodiment, in contrastto Case A1, the SFL is “OFF”. In Case A2, upon receipt of the executionrequest from the mobile terminal PT1 using the P2P communication link(e.g., step S10 in FIG. 2), the MFP 10 changes its operating status tothe G/O status (e.g., step S14 in FIG. 2) and transmits, to the mobileterminal PT1, a Response signal including an SSID and password to beused in the WFDNW in which the MFP 10 serves as a G/O-status device(i.e., as a master) (e.g., step S16 in FIG. 2) as distinct from Case A1.That is, according to the illustrative embodiment, the MFP 10 maytransmit an appropriate one of the Response signal including NGinformation and the Response signal including the SSID and password inaccordance with whether the SFL is “ON” or “OFF”. Therefore, the MFP 10may operate appropriately in accordance with whether the SFL is “ON” or“OFF”.

The MFP 10 may be an example of a “communication device”. Each of themobile terminals PT1, PT2, and PT3 may be an example of a “terminaldevice”. The NFC system may be an example of a “first system” and“short-range wireless communication protocol”. The WFD system may be anexample of a “second system” and “Wi-Fi-compliant communicationprotocol”. Each of the NFC I/Fs 20 and 80 may be an example of a “firstinterface” and “short-range wireless interface”. Each of the wirelessLAN I/Fs 22 and 82 may be an example of a “second interface” and “Wi-Fiinterface”. The execution request may be an example of “particularrequest information” and “request information”. The SSID and thepassword to be used in the WFDNW in which the MFP 10 serves as aG/O-status device may be an example of “network information”. TheResponse signal including the NG information may be an example of “firstresponse information”. The Response signal including the SSID and thepassword may be an example of “second response information”. In otherwords, the first response information may be information for notifyingthe terminal device to provide the authentication information. The SFLauthentication information may be an example of “particularauthentication information” and “authentication information”. The SFLtable 40 may be an example of a “list used for authentication”. The SFLsetting information 38 may be an example of “setting information”. Theauthentication executed in step S38 in FIG. 3 may be an example of a“first determination process”. The P2P communication link establishedbetween the MFP 10 and the mobile terminal PT1 may be an example of a“first communication link”. The MFP 10 (R/W)-mobile terminal PT1 (CE)communication link established between the MFP 10 and the mobileterminal PT1 may be an example of a “second communication link”. The P2Pmode of the MFP 10 may be an example of a “first mode”. The R/W mode ofthe MFP 10 may be an example of a “second mode” and “another mode”. TheP2P mode of the mobile terminal PT1 may be an example of a “third mode”.The CE mode mobile of the terminal PT1 may be an example of a “fourthmode” and “another mode”.

The processing executed in step S10 in FIG. 2 may be an example ofprocessing executed by a “requested information reception portion” ofthe “communication device”. The processing executed in step S30 in FIG.3 may be an example of processing executed by a “first response portion”of the “communication device”. The processing executed in step S38 inFIG. 3 may be an example of processing executed by a “firstdetermination portion” of the “communication device”. The processingexecuted in each of steps S42 and S46 in FIG. 3 may be an example ofprocessing executed by a “first communication portion” of the“communication device”. The processing executed in step S44 in FIG. 3may be an example of processing executed by an “execution portion” ofthe “communication device”. The processing executed in step S16 in FIG.2 may be an example of processing executed by a “second responseportion” of the “communication device”.

The processing executed in step S60 in FIG. 4 may be an example ofprocessing executed by a “request-information transmission portion” ofthe “terminal device”. The processing executed in each of steps S62 andS80 in FIG. 4 may be an example of processing executed by a “responsereception portion” of the “terminal device”. The processing executed instep S68 in FIG. 4 may be an example of processing executed by an“authentication-information transmission portion” of the “terminaldevice”. The processing executed in step S72 in FIG. 4 may be an exampleof processing executed by a “communication portion” of the “terminaldevice”. The processing executed in each of steps S76 and S86 in FIG. 4may be an example of processing executed by an “execution portion” ofthe “terminal device”. The processing executed in each of steps S74 andS88 in FIG. 4 may be an example of processing executed by a “statechange portion” of the “terminal device”.

Hereinafter, a second illustrative embodiment will be described mainlywith different points from the first illustrative embodiment. In thesecond illustrative embodiment, as depicted in FIG. 7, when a P2Pcommunication link is established between the MFP 10 and the mobileterminal PT1 while the SFL is “ON” in the MFP 10, the MFP 10 and themobile terminal PT1 may operate differently from the MFP 10 and themobile terminal PT1 that operate in the respective manners in Case A1(see FIG. 5) in the first illustrative embodiment. When the SFL is “OFF”in the MFP 10, the MFP 10 and the mobile terminal PT1 may operatesubstantially the same as the MFP 10 and the mobile terminal PT1 thatoperate in the respective manners in Case A2 (see FIG. 6) in the firstillustrative embodiment, and therefore, a description for such a casewill be omitted.

Referring to FIG. 7, Case B will be described below. In Case B, as thepower of the MFP 10 is turned on, the NFC I/F 20 starts operating in aninitial state where the P2P mode is active (e.g., “ON”) and the othermodes (e.g., the R/W mode and the CE mode) are inactive (e.g., “OFF”).At this point, the MFP 10 serves as a device-status device that does notbelong in any WFDNW, and the SFL is “ON” in the MFP 10.

As the user of the mobile terminal PT1 performs an application startupoperation and an execution instruction operation, the NFC I/F 80 of themobile terminal PT1 starts operating in the state where the P2P mode andthe R/W mode are active (e.g., “ON”) and the CE mode is inactive (e.g.,“OFF”).

As the user of the mobile terminal PT1 brings the mobile terminal PT1closer to the MFP 10, a P2P communication link is established betweenthe MFP 10 and the mobile terminal PT1.

Processing of subsequent steps executed until the P2P communication linkestablished between the MFP 10 and the target terminal is disconnected(e.g., processing of a step in which the CPU 32 of the MFP 10 receivesan execution request from the mobile terminal PT1 and processing of astep in which the CPU 32 of the MFP 10 transmits a Response signalincluding NG information to the mobile terminal PT1) may besubstantially the same as the processing of the steps executed in CaseA1 (see FIG. 5) according to the first illustrative embodiment, andtherefore, a description for the processing of such steps will beomitted.

In Case B, as the P2P communication link is disconnected, the CPU 32 ofthe MFP 10 changes the state of the NFC I/F 20 from the state where theP2P mode is active (e.g., “ON”) and the other modes are inactive (e.g.,“OFF”) to the state where the CE mode is active (e.g., “ON”) and theother modes are inactive (e.g., “OFF”). That is, the CPU 32 ends the P2Pmode and starts the CE mode.

When the state of the NFC I/F 20 changes to the state where the CE modeis active (e.g., “ON”) and the other modes are inactive (e.g., “OFF”),an MFP 10(CE)-mobile terminal PT1(R/W) communication link is establishedbetween the NFC I/F 80 of the mobile terminal PT1 and the NFC I/F 20 ofthe MFP 10.

The CPU 92 of the mobile terminal PT1 transmits SFL authenticationinformation from the mobile terminal PT1 to the MFP 10 using theestablished R/W-CE communication link. More specifically, the CPU 92writes the SFL authentication information into the NFC I/F 20 of the MFP10.

Upon receipt of the SFL authentication information, the CPU 32 of theMFP 10 executes authentication using the received SFL authenticationinformation.

When the CPU 32 of the MFP 10 determines that the authentication issuccessful, the CPU 32 changes the operating status of the MFP 10 fromthe device status to the G/O status. Thus, a WFDNW in which the MFP 10serves as a G/O-status device (i.e., as a master) is configured. The CPU32 prepares a wireless profile (e.g., an SSID, a password, anauthentication method, and an encryption method) to be used in the WFDNWand stores the prepared wireless profile in the memory 34. Then, the CPU32 writes, into the NFC I/F 20, the SSID and password to be used incommunication using the WFD system.

The CPU 92 of the mobile terminal PT1 receives the SSID and password tobe used in communication using the WFD system from the MFP 10 using theMFP 10(CE)-mobile terminal PT1(R/W) communication link. Morespecifically, the CPU 92 reads and obtains the SSID and the passwordfrom the NFC I/F 20 of the MFP 10.

In Case B, as the CPU 92 of the mobile terminal PT1 reads the SSID andthe password, the CPU 32 of the MFP 10 returns the state of the NFC I/F20 from the state where the CE mode is active (e.g., “ON”) and the othermodes are inactive (e.g., “OFF”) to the state where the P2P mode isactive (e.g., “ON”) and the other modes are inactive (e.g., “OFF”). Morespecifically, the CPU 32 ends the CE mode and starts the P2P mode. Thus,the MFP 10(CE)-mobile terminal PT1(R/W) communication link isdisconnected.

Processing of subsequent steps executed between the CPU 92 of the mobileterminal PT1 and the CPU 32 of the MFP 10 may be substantially the sameas the processing of the steps executed in Case A1 (see FIG. 5)according to the first illustrative embodiment, and therefore, adescription for the processing of such steps will be omitted.

When the CPU 32 of the MFP 10 determines that the authentication isfailed, the CPU 32 writes an NG notification into the NFC I/F 20 insteadof the SSID and the password.

In response to this, the CPU 92 of the mobile terminal PT1 receives theNG notification from the MFP 10 using the MFP 10(CE)-mobile terminalPT1(R/W) communication link. More specifically, the CPU 92 reads andobtains the NG notification from the NFC I/F 20 of the MFP 10.

Upon receipt of the NG notification, the CPU 92 of the mobile terminalPT1 displays a predetermined error message on the display unit 74.

As the CPU 92 of the mobile terminal PT1 reads out the NG notification,the CPU 32 of the MFP 10 returns the state of the NFC I/F 20 from thestate where the CE mode is active (e.g., “ON”) and the other modes areinactive (e.g., “OFF”) to the state where the P2P mode is active (e.g.,“ON”) and the other modes are inactive (e.g., “OFF”). Thus, the MFP10(CE)-mobile terminal PT1(R/W) communication link is disconnected.

According to the second illustrative embodiment, in Case B (see FIG. 7),subsequent to the disconnection of the P2P communication link, the MFP10 changes the state of the NFC I/F 20 from the initial state where theP2P mode is active (e.g., “ON”) and the other modes (e.g., the R/W modeand the CE mode) are inactive (e.g., “OFF”) to the state where the CEmode is active (e.g., “ON”) and the other modes (e.g., the R/W mode andthe CE mode) are inactive (e.g., “OFF”). As described above, the MFP 10may change the state of the NFC I/F 20 appropriately.

The P2P mode of the NFC I/F 20 of the MFP 10 may be another example ofthe “first mode”. The CE mode of the NFC I/F 20 of the MFP 10 may beanother example of the “second mode” and “another mode”. The P2P mode ofthe NFC I/F 80 of the mobile terminal PT1 may be another example of the“third mode”. The R/W mode of the NFC I/F 80 of the mobile terminal PT1may be another example of the “fourth mode” and “another mode”. Theprocessing in which the CPU 32 of the MFP 10 changes the state of theNFC I/F 20 from the initial state where the P2P mode is active and theother modes (e.g., the R/W mode and the CE mode) are inactive to thestate where the CE mode is active and the other modes (e.g., the R/Wmode and the CE mode) are inactive after the P2P communication link isdisconnected in Case B (see FIG. 7) may be another example of theprocessing executed by the “state change portion” of the “communicationdevice”.

Hereinafter, a third illustrative embodiment will be described mainlywith different points from the first illustrative embodiment. Thecontents of the SFL table 40 may be different between the thirdillustrative embodiment and the first illustrative embodiment. Asdepicted in FIGS. 10 and 12, the SFL table 40 includes a pluralitypieces of combined information, each of which include, for example, auser ID (e.g., “U1”), a password (e.g., “P1”), availability informationfor printing function (e.g., “OK” or “NG”), availability information forscanning function (e.g., “OK” or “NG”), and availability information forhandover (“H/O”) (e.g., “OK” or “NG”), which are associated with eachother. In each combined information, the availability information forprinting function indicates whether the printing function is availableto the user. The availability information for scanning functionindicates whether the scanning function is available to the user. Theavailability information for H/O indicates whether the user is allowedto perform a handover. The handover may be performed to establish abelonging situation in which both a mobile terminal (e.g., the mobileterminal PT1) and the MFP 10 belong in the same WFDNW. For example, theSFL table 40 depicted in FIG. 10 includes combined information including“USER ID=U1”, “PASSWORD=P1”, “PRINTING=NG”, “SCANNING=OK”, “H/O=NG”which are associated with each other.

In the third illustrative embodiment, depicted in FIG. 8, the detail ofthe SFL authentication process executed by the CPU 32 of the MFP 10 maybe different from the SFL authentication process executed by the CPU 32of the MFP 10 in the first illustrative embodiment. When a negativedetermination (e.g., NO) is made in step S12 in FIG. 2 in the thirdillustrative embodiment, the same processing as the processing executedin step 14 and subsequent steps according to the first illustrativeembodiment are executed in steps subsequent to step 12 in the thirdillustrative embodiment, and therefore, a description for the processingof such steps will be omitted.

Referring to FIG. 8, the detail of the SFL authentication processexecuted in the MFP 10 in step S20 in FIG. 2 according to the thirdillustrative embodiment will be described. When the SFL settinginformation 38 indicates “ON” (e.g., YES in step S12 in FIG. 2) at thetime of receiving an execution request from a target terminal using aP2P communication link established between the MFP 10 and the targetterminal (e.g., step S10 in FIG. 2), the CPU 32 executes the SFLauthentication process in FIG. 8.

In step S100, the CPU 32 determines whether at least one of the users isallowed to perform a handover. More specifically, in step S100, the CPU32 determines whether at least one of the plurality of pieces ofcombined information include “H/O=OK” with reference to the SFL table40. As depicted in FIG. 10, when the CPU 32 determines that all of theone or more pieces of the combined information stored in the SFL table40 include “H/O=OK”, the CPU 32 makes a negative determination (e.g.,NO) in step S100, and the routine proceeds to step S132. As depicted inFIG. 12, when the CPU 32 determines that at least one of the pluralityof pieces of combined information includes “H/O=OK” in the SFL table 40,the CPU 32 makes a positive determination (e.g., OK) in step S100, andthe routine proceeds to step S102.

In step S132, the CPU 32 transmits a Response signal includingpredetermined prohibition information to the target terminal using theP2P communication link established between the MFP 10 and the targetterminal. The prohibition information indicates none of the users isallowed to perform a handover. In step S134, the CPU 32 transmits aDeactivation signal to the target terminal using the P2P communicationlink.

In response to the Deactivation signal, the target terminal transmits anOK signal to the MFP 10 using the P2P communication link. Thus, the P2Pcommunication link established between the MFP 10 and the targetterminal is disconnected. Upon completion of the processing in stepS134, the CPU 32 ends the SFL authentication process of FIG. 8 and thecommunication process of FIG. 2.

In step S102, the CPU 32 transmits a Response signal including NGinformation to the target terminal using the P2P communication linkestablished between the MFP 10 and the target terminal. Processingexecuted in steps S104, S106, S108, and S110 subsequent to step S102 maybe substantially the same as the processing executed in steps S32, S34,S36, and S38, respectively, in FIG. 3, and therefore, a detaileddescription for the processing of such steps will be omitted. Theprocessing of step S110 may be an example of the situation in which “theauthentication information is correct”. When the CPU 32 makes a positivedetermination (e.g., YES) in step S110 (e.g., when the CPU 32 determinesthat the authentication is successful), the routine proceeds to stepS112. When the CPU 32 makes a negative determination (e.g., NO) in stepS110 (e.g., when the CPU 32 determines that the authentication isfailed), the routine proceeds to step S122.

In step S112, the CPU 32 determines whether the user identified by theuser ID received in step S108 is allowed to perform a handover. Morespecifically, in step S112, the CPU 32 determines whether “H/O=OK” isassociated with the user ID received in step S108 with reference to theSFL table 40 (see FIG. 12). When the CPU 32 determines that “H/O=OK” isassociated with the user ID received in step S108, the CPU 32 makes apositive determination (e.g., YES) in step S112, and the routineproceeds to step S114. When the CPU 32 determines that “H/O=NG” is notassociated with the user ID received in step S108, the CPU 32 makes anegative determination (e.g., NO) in step S112, and the routine proceedsto step S122.

In step S114, the CPU 32 determines whether the particular functiondesignated by the execution request is available to the user identifiedby the user ID received in step S108. More specifically, in step S114,the CPU 32 determines whether “PRINTING=OK” (or “SCANNING=OK”) isassociated with the user ID received in step S108 with reference to theSFL table 40 (see FIG. 12). For example, in a case where the particularfunction designated by the execution request is the printing functionand “PRINTING=OK” is associated with the user ID received in step S108,the CPU 32 makes a positive determination (e.g., YES) in step S114, andthe routine proceeds to step S116. In a case where the particularfunction designated by the execution request is the printing functionand “PRINTING=NG” is associated with the user ID received in step S108,the CPU 32 makes a negative determination (e.g., NO) in step S114, andthe routine proceeds to step S122.

Processing executed in steps S116, S118, and S120 subsequent to S114 maybe substantially the same as the processing executed in steps S40, S42,and S44 in FIG. 3, and therefore, a detailed description for theprocessing of such steps will be omitted. Upon completion of theprocessing in step S120, the CPU 32 ends the SFL authentication processof FIG. 8 and the communication process of FIG. 2.

In step S122, the CPU 32 transmits a predetermined NG notification tothe target terminal using the MFP 10 (R/W)-target terminal (CE)communication link in a similar manner to step S46 in FIG. 3. In thiscase, wireless connection is not established between the MFP 10 and thetarget terminal. Upon completion of the processing in step S122, the CPU32 ends the SFL authentication process of FIG. 8 and the communicationprocess of FIG. 2.

In the third illustrative embodiment, as depicted in FIGS. 9 and 11,when a P2P communication link is established between the MFP 10 and themobile terminal PT1 while the SFL is “ON” in the MFP 10, the MFP 10 andthe mobile terminal PT1 may operate differently from the MFP 10 and themobile terminal PT1 that operate in the respective manners in Case A1(see FIG. 5) in the first illustrative embodiment. Referring to FIGS. 9,10, 11, and 12, example cases will be described.

Referring to FIG. 9, Case C1 will be described below. In Case C1,communication may be performed between the MFP 10 and the mobileterminal PT1 when a P2P communication link is established between theMFP 10 and the mobile terminal PT1 while the SFL is “ON” in the MFP 10.In Case C1, an SFL table 40 depicted in FIG. 10 is stored in the memory34 of the MFP 10.

Processing of steps executed between when the CPU 32 of the MFP 10receives an execution request and when the P2P communication link isestablished between the MFP 10 and the mobile terminal PT1 may besubstantially the same as the processing of the steps executed in CaseA1 (see FIG. 5) in the first illustrative embodiment.

In Case C1, upon receipt of an execution request, the CPU 32 of the MFP10 determines whether at least one of the users is allowed to perform ahandover (e.g., step S100 in FIG. 8). In Case C1, as depicted in FIG.10, all of a plurality of pieces of combined information stored in theSFL table 40 include “H/O=NG”. Therefore, the CPU 32 determines thatnone of the users is allowed to perform a handover (e.g., the CPU 32makes a negative determination (e.g., NO) in step S100 in FIG. 8).

The CPU 32 of the MFP 10 transmits a Response signal includingprohibition information to the mobile terminal PT1 using the P2Pcommunication link (e.g., step S132 in FIG. 8).

Upon receipt of the Response signal including prohibition information,the CPU 92 of the mobile terminal PT1 displays a predetermined errormessage on the display unit 74.

Subsequent to this, the CPU 32 of the MFP 10 transmits a Deactivationsignal to the target terminal using the P2P communication link (e.g.,step S134 in FIG. 8).

In response to the Deactivation signal, the CPU 92 of the mobileterminal PT1 transmits an OK signal to the MFP 10 using the P2Pcommunication link. Thus, the P2P communication link established betweenthe MFP 10 and the target terminal is disconnected.

Referring to FIGS. 11 and 12, Case C2 will be described below. In CaseC2, the MFP 10 stores therein an SFL table 40 depicted in FIG. 12.Processing of steps executed between when the CPU 32 of the MFP 10receives an execution request and when the P2P communication link isestablished between the MFP 10 and the mobile terminal PT1 may besubstantially the same as the processing of the steps executed in CaseA1 (see FIG. 5) according to the first illustrative embodiment. In CaseC2, the execution request includes information for requesting executionof the printing function.

In Case C2, upon receipt of the execution request, the CPU 32 of the MFP10 determines whether at least one of the users is allowed to perform ahandover (e.g., step S100 in FIG. 8). In Case C2, as depicted in FIG.12, there is at least one of the plurality of pieces of combinedinformation includes “H/O=OK” in the SFL table 40. Therefore, the CPU 32determines that at least one of the users is allowed to perform ahandover (e.g., the CPU 32 makes a positive determination (e.g., YES) instep S100 in FIG. 8).

The CPU 32 of the MFP 10 transmits a Response signal including NGinformation to the mobile terminal PT1 using the P2P communication link(e.g., step S102 in FIG. 8). Then, the P2P communication linkestablished between the MFP 10 and the target terminal is disconnected.

Subsequent to the disconnection of the P2P communication link, the CPU92 changes the state of the NFC I/F 80 from the state where the P2P modeis active and the other modes are inactive to the state where the CEmode is active (e.g., “ON”) and the other modes are inactive (e.g.,“OFF”) (e.g., step S66 in FIG. 4). The CPU 92 writes the SFLauthentication information (e.g., the user ID (e.g., “U1”) and thepassword (e.g., “P1”)) into the NFC I/F 80.

Subsequent to this, an MFP 10 (R/W)-mobile terminal PT1 (CE)communication link is established between the NFC I/F 80 of the mobileterminal PT1 and the NFC I/F 20 of the MFP 10 (e.g., YES in step S106 inFIG. 8 or YES in step S70 in FIG. 4).

The CPU 32 of the MFP 10 receives the SFL authentication informationfrom mobile terminal PT1 using the established R/W-CE communication link(e.g., step S108 in FIG. 8). Subsequent to this, the CPU 32 executesauthentication using the received SFL authentication information (e.g.,the user ID (e.g., “U1”) and the password (e.g., “P1”) (e.g., step S110in FIG. 8). As depicted in FIG. 12, the SFL table 40 includes thecombined information including “USER ID=U1” and “PASSWORD=P1”.Therefore, in Case C2, the CPU 32 determines that the authentication issuccessful (e.g., the CPU 32 makes a positive determination (e.g., YES)in step S110 in FIG. 8).

Subsequently, the CPU 32 determines whether the user identified by theuser ID (e.g., “U1”) is allowed to perform a handover (e.g., step S112in FIG. 8). As depicted in FIG. 12, “H/O=NG” is associated with the userID (e.g., “U1”). Therefore, the CPU 32 determines that the identifieduser is not allowed to perform a handover (e.g., NO in step S112 in FIG.8), and transmits an NG notification to the mobile terminal PT1 usingthe R/W-CE communication link (e.g., step S122 in FIG. 8).

Upon receipt of the NG notification, the CPU 92 of the mobile terminalPT1 displays a predetermined error message on the display unit 74 (e.g.,step S86 in FIG. 4). Subsequent to this, the CPU 92 returns the state ofthe NFC I/F 80 from the state where the CE mode is active (e.g., “ON”)and the other modes are inactive (e.g., “OFF”) to the state where theP2P mode is active (e.g., “ON”) and the other modes are inactive (e.g.,“OFF”) (e.g., step S88 in FIG. 4). Thus, the MFP 10 (R/W)-mobileterminal PT1 (CE) communication link is disconnected. In this case,wireless connection is not connected between the MFP 10 and the mobileterminal PT1.

Hereinafter, another example case in which, in place of the mobileterminal PT1, the mobile terminal PT2 (see FIG. 1) establishes a P2Pcommunication link with the MFP 10 and transmits, to the MFP 10, anexecution request for execution of the printing function, will bedescribed. Processing of steps executed between when the CPU 32 of theMFP 10 receives SFL authentication information and the P2P communicationlink is established between the MFP 10 and the mobile terminal PT2 maybe substantially the same as the processing of the steps executed in theexample case of the mobile terminal PT1. In this case, the SFLauthentication information that the MFP 10 receives from the mobileterminal PT2 includes a user ID (e.g., “U2”) and a password (e.g., “P1”)associated with the mobile terminal PT2. As depicted in FIG. 12, the SFLtable 40 includes combined information including “USER ID=U2” and“PASSWORD=P1”. Therefore, in this case, also, the CPU 32 determines thatthe authentication is successful (e.g., the CPU 32 makes a positivedetermination (e.g., YES) in step S110 in FIG. 8).

Subsequent to this, the CPU 32 determines whether the user identified bythe user ID (e.g., “U2”) is allowed to perform a handover (e.g., stepS112 in FIG. 8). As depicted in FIG. 12, “H/O=OK” is associated with the“USER ID=U2” in the SFL table 40. Therefore, the CPU 32 determines thatthe identified user is allowed to perform a handover (e.g., YES in stepS112 in FIG. 8).

Subsequently, the CPU 32 determines whether the printing function isavailable to the user identified by the user ID (e.g., “U2”) (e.g., stepS114 in FIG. 8). As depicted in FIG. 12, “PRINTING=NG” is associatedwith the “USER ID=U2” in the SFL table 40. Therefore, the CPU 32determines that the printing function is not available to the identifieduser (e.g., NO in step S114 in FIG. 8), and transmits an NG notificationto the mobile terminal using the R/W-CE communication link (e.g., stepS122 in FIG. 8). Processing of subsequent steps may be substantially thesame as the processing of the steps executed in the example case of themobile terminal PT1.

Hereinafter, other example case in which, in place of the mobileterminal PT1, the mobile terminal PT3 (see FIG. 1) establishes a P2Pcommunication link with the MFP 10 and transmits, to the MFP 10, anexecution request for execution of the printing function, will bedescribed. Processing of steps executed between when the CPU 32 of theMFP 10 receives SFL authentication information and the P2P communicationlink is established between the MFP 10 and the mobile terminal PT3 maybe substantially the same as the processing of the steps executed in theexample case of the mobile terminal PT1. In this case, the SFLauthentication information that the MFP 10 receives from the mobileterminal PT3 includes a user ID (e.g., “U3”) and a password (e.g., “P3”)associated with the mobile terminal PT3. As depicted in FIG. 12, the SFLtable 40 includes combined information including “USER ID=U3” and“PASSWORD=P3”. Therefore, the CPU 32 determines that the authenticationis successful (e.g., the CPU 32 makes a positive determination (e.g.,YES) in step S110 in FIG. 8). Since “H/O=OK” is associated with “USERID=U3” in the SFL table 40, subsequently, the CPU 32 determines that theidentified user is allowed to perform a handover (e.g., YES in step S112in FIG. 8). In the SFL table 40, “PRINTING=OK” is further associatedwith “USER ID=U3”. Therefore, the CPU 32 determines that the printingfunction is available to the identified user (e.g., YES in step S114 inFIG. 8).

In this case, the CPU 32 changes the operating status of the MFP 10 fromthe device status to the G/O status (e.g., step S116 in FIG. 8). Thus, aWFDNW in which the MFP 10 serves as a G/O-status device (i.e., as amaster) is configured. The CPU 32 prepares a wireless profile (e.g., anSSID, a password, an authentication method, and an encryption method) tobe used in the WFDNW and stores the prepared wireless profile in thememory 34.

Subsequently, the CPU 32 transmits the SSID and password to be used incommunication using the WFD system to the mobile terminal PT3 using anMFP 10(R/W)-mobile terminal PT3(CE) communication link (e.g., step S42in FIG. 3).

Processing of subsequent steps may be substantially the same as theprocessing of the steps executed in Case A1 (see FIG. 5) according tothe first illustrative embodiment. That is, wireless connection isestablished between the mobile terminal PT3 and the MFP 10 and the MFP10 receives print data from the mobile terminal PT3. In this case, theMFP 10 executes the printing function without determining whether theprinting function is available to the identified user after receivingthe print data.

According to the third illustrative embodiment, as depicted in FIGS. 10and 12, information indicating whether the user is allowed to perform ahandover is associated with each of the plurality of pieces combinedinformation included in the SFL table 40. Upon receipt of the executionrequest, the MFP 10 determines whether at least one of the plurality ofthe users is allowed to perform a handover (e.g., step S100 in FIG. 8).In Case C1, the MFP 10 determines that none of the users is allowed toperform a handover (e.g., the CPU 32 makes a negative determination(e.g., NO) in step S100 in FIG. 8). The MFP 10 transmits a Responsesignal including prohibition information to the mobile terminal PT1using the P2P communication link (e.g., step S132 in FIG. 8). In CaseC2, the MFP 10 determines that at least one of the plurality of theusers is allowed to perform a handover (e.g., the CPU 32 makes apositive determination (e.g., YES) in step S100 in FIG. 8). The MFP 10transmits a Response signal including NG information to the mobileterminal PT1 using the P2P communication link (e.g., step S102 in FIG.8). That is, according to the third illustrative embodiment, the MFP 10may transmit appropriate one of the Response signal including NGinformation and the Response signal including prohibition information,in accordance with whether at least one of the plurality of the users isallowed to perform a handover. Therefore, the MFP 10 may transmitappropriate one of the Response signal including NG information and theResponse signal including prohibition information to the mobile terminalPT1.

In Case C2 depicted in FIGS. 11 and 12, when the MFP 10 determines thatthe authentication is successful (e.g., the CPU 32 makes a positivedetermination (e.g., YES) in step S110 in FIG. 8), the MFP 10 furtherdetermines whether the identified user is allowed to perform a handover(e.g., step S112 in FIG. 8). In Case C2, the MFP 10 determines whetherthe printing function is available to the identified user (e.g., stepS114 in FIG. 8). That is, according to the third illustrativeembodiment, the MFP 10 may determine whether the MFP 10 transmits theSSID and password to the mobile terminal, in accordance whether theidentified user is allowed to perform a handover and whether theprinting function is available to the identified user. Thus, the MFP 10may transmit the SSID and the password to the mobile terminalappropriately.

The plurality of pieces of combined information included in the SFLtable 40 depicted in FIGS. 10 and 12 may be an example of “a pluralityof pieces of associated information”. The information indicating whetherthe user is allowed to perform a handover included in the SFL table 40(e.g., “OK” or “NG”) may be an example of “first information”. Theinformation indicating whether the printing function (or the scanningfunction) is available to the identified user included in the SFL table40 (e.g., “OK” or “NG”) may be an example of “second information”. TheResponse signal including prohibition information may be an example of“third response information”. In other words, the third responseinformation may be information for notifying the terminal device thatwireless connection using the second system cannot be establishedbetween the communication device and the terminal device. The processingexecuted in step S100 in FIG. 8 may be an example of “seconddetermination processing”. The processing executed in step S112 in FIG.8 may be an example of “third determination processing”. The processingexecuted in step S114 in FIG. 8 may be an example of “fourthdetermination processing”. The processing executed in step S100 in FIG.8 may be an example of processing executed by a “second determinationportion”. The processing executed in step S112 in FIG. 8 may be anexample of processing executed by a “third determination portion”. Theprocessing executed in step S114 in FIG. 8 may be an example ofprocessing executed by a “fourth determination portion”.

Various embodiments of the disclosure have been described above;however, such embodiments are only examples and do not limit the scopeof the appended claims. Examples of the modification and alternations ofthe above-described embodiment are described below.

In the above-described illustrative embodiments, in a predeterminedsituation (e.g., step S14 in FIG. 2, step S40 in FIG. 3, or step S116 inFIG. 8), the CPU 32 of the MFP 10 changes the operating status of theMFP 10 from the device status to the G/O status. Nevertheless, in otherembodiments, for example, the CPU 32 of the MFP 10 may start serving asa G/O-status device as the power of the MFP 10 is turned on. In otherembodiments, for example, the CPU 32 of the MFP 10 may perform a G/Onegotiation with a CPU of a target terminal (e.g., the mobile terminalPT1) to determine one of the MFP 10 and the target terminal as aG/O-status device and the other of the MFP 10 and the target terminal asa CL-status device. In this case, the target terminal needs to be aWFD-enabled device. When the target terminal is determined as aG/O-status device, the CPU of the target terminal transmits, to the MFP10, an SSID and password to be used in the WFDNW configured by thetarget terminal. In other embodiments, for example, in the predeterminedsituation, the target terminal may start operating as a G/O-statusdevice without performing a G/O negotiation with the MFP 10. In thiscase, the CPU of the target terminal transmits the SSID and password tobe used in the WFDNW configured by the target terminal. That is,generally speaking, when it is determined that the authenticationinformation is correct, the first communication portion may beconfigured to perform communication of network information to be used ina particular wireless network, with the terminal device, via the firstinterface.

In the above-described illustrative embodiments, in the predeterminedsituation (e.g., step S14 in FIG. 2, step S40 in FIG. 3, or step S116 inFIG. 8), the MFP 10 starts serving as a G/O-status device. That is, theMFP 10 serves as a master in the WFDNW. Nevertheless, in otherembodiments, for example, the MFP 10 may belong in a Wi-Fi network(“Wi-FiNW”) configured by an access point (“AP”) (not depicted), as aslave (more specifically, as a station). In this case, in step S16 inFIG. 2, in step S42 in FIG. 3, or in step S118 in FIG. 8, the CPU 32 ofthe MFP 10 may transmit an SSID and a password that are used in theWi-FiNW configured by the AP, to the target terminal. In this case, thetarget terminal may establish wireless connection with the AP using theSSID and the password and perform wireless communication of target datawith the MFP 10 using the Wi-FiNW configured by the AP. Generallyspeaking, when it is determined that the authentication information iscorrect, the first communication portion may be configured to performcommunication of network information to be used in a particular wirelessnetwork, with the terminal device, via the first interface.

In the above-described illustrative embodiments, in each step of stepsS32 in FIG. 3, S64 in FIG. 4, and S104 and S134 in FIG. 8, the CPU 32 ofthe MFP 10 transmits a Deactivation signal to the target terminal todisconnect the P2P communication link established between the MFP 10 andthe target terminal. The manner of disconnecting the P2P communicationlink is not limited to the above example. In other embodiments, forexample, in each step of steps S32 in FIG. 3, S64 in FIG. 4, and S104and S134 in FIG. 8, the CPU 32 of the MFP 10 may turn off the power ofthe NFC I/F 20 or the CPU of the target terminal (e.g., the CPU 92 ofthe mobile terminal PT1) may turn off the power of the NFC I/F (e.g.,the NFC I/F 80). Turning off of the power of the NFC I/F may forcefullydisconnect the P2P communication link. In other embodiments, forexample, the user of the target terminal may move the target terminalaway from the MFP 10 out of the range in which the target terminal canperform communication using the NFC system with the MFP 10, todisconnect the P2P communication link. In this case, the CPU of thetarget terminal may display, on the display unit of the target terminal,a message prompting the user to move the target terminal away from theMFP 10. These variations may also be an example of the situation inwhich “the first communication link is disconnected”.

In other embodiments, for example, it may be unnecessary for the memory94 of the mobile terminal PT1 to store the SFL authenticationinformation therein in advance. For example, in modifications to thefirst and third illustrative embodiments, the CPU 92 of the mobileterminal PT1 may display, on the display unit 74, an entry screenprompting the user to enter SFL authentication information. In thiscase, the user may enter the SFL authentication information by operatingthe operation unit 72 while the entry screen is displayed on the displayunit 74. In the first and third illustrative embodiments, the CPU 92 ofthe mobile terminal PT1 may write the SFL authentication informationentered through the entry screen, into the NFC I/F 80. For anotherexample, in the second illustrative embodiment, upon establishment ofthe R/W-CE communication link, the CPU 92 of the mobile terminal PT1 maytransmit the SFL authentication information entered through the entryscreen to the MFP 10 using the R/W-CE communication link. Generallyspeaking, an authentication-information reception portion of thecommunication device may receive particular authentication informationfrom the terminal device via the first interface after first responseinformation is transmitted to the terminal device. When the firstresponse information is received from the communication device, theauthentication-information transmission portion of the terminal devicemay transmit the particular authentication information to thecommunication device via the first interface.

In other embodiments, for example, it may be unnecessary to store theSFL table 40 in the memory 34 of the MFP 10. That is, another devicethat is communicably connected to the MFP 10 may store an SFL tabletherein. In this case, upon receipt of SFL authentication informationfrom the target terminal (e.g., step S36 in FIG. 3 of or step S108 inFIG. 8), the CPU 32 of MFP 10 may transmit the received SFLauthentication information to the other device. A CPU of the otherdevice may execute authentication and transmit an authentication result(e.g., succession or failure of the authentication) to the MFP 10.Generally speaking, when the particular authentication information isreceived from the terminal device, the first communication portion maybe configured to execute the first determination process in which it isdetermined whether the particular authentication information is correct.

In other embodiments, mode switching of the NFC I/F 20 of the MFP 10 mayoccur. For example, as modifications of the first and third illustrativeembodiments, as the power of the MFP 10 is turned on, the CPU 32 of theMFP 10 may allow the NFC I/F 20 to operate in the state where P2P modeis active and the other modes are inactive. Subsequent to this, afterthe CPU 32 of the MFP 10 transmits a Deactivation signal fordisconnecting the P2P communication link (e.g., step S32 in FIG. 3 orstep S104 in FIG. 8), the CPU 32 may change the state of the NFC I/F 20to the state where the R/W mode is active and the other modes areinactive. In this case, after the CPU 32 of the MFP 10 transmits an SSIDand a password to the target terminal (e.g., step S42 in FIG. 3 or stepS118 FIG. 8) or after the CPU 32 of the MFP 10 transmits an NGnotification to the target terminal (e.g., step S46 in FIG. 3 or stepS122 in FIG. 8), the CPU 32 of the MFP 10 may return the state of theNFC I/F 20 to the P2P mode is active and the other modes are inactive.This variation may be another example of the processing executed by thestate change portion of the communication device.

Likewise, in the second illustrative embodiment, for example, as theapplication startup operation and the execution instruction operationare performed, the CPU 92 of the mobile terminal PT1 may allow the NFCI/F 80 to operate in the state where the P2P mode is active and theother modes are inactive. Subsequent to this, upon receipt of a Responsesignal including NG information, the CPU 92 of the mobile terminal PT1may change the state of the NFC I/F 80 to the state where the R/W modeis active and the other modes are inactive. In this case, after the CPU92 of the mobile terminal PT1 receives an SSID and a password from theMFP 10 or after the CPU 92 of the mobile terminal PT1 receives an NGnotification from the MFP 10, the CPU 92 of the mobile terminal PT1 mayreturn the state of the NFC I/F 80 to the initial state where the P2Pmode is active and the other modes are inactive. This variation may bean example of processing executed by the state change portion of theterminal device.

In the above-described illustrative embodiments, a P2P communicationlink is established between the MFP 10 and the target terminal as afirst step. After the P2P communication link is disconnected, an R/W-CEcommunication link is established between the MFP 10 and the targetterminal as a second step. The MFP 10 and the target terminal performscommunication of an execution request and a Response signal using theP2P communication link, and performs communication of SFL authenticationinformation, an SSID and a password using the R/W-CE communication link.In other embodiments, for example, the MFP 10 and the target terminalmay perform all the above-described communication using the establishedP2P communication link (i.e., might not disconnect the P2P communicationlink established therebetween). In this case, as necessary, the CPU 32of the MFP 10 may display, on the display unit 14, a screen forprompting the user to perform an appropriate operation Likewise, the CPUof the target terminal may display, on the display unit 74, a screen forprompting the user to perform an appropriate operation. In otherembodiments, for example, the MFP 10 and the target terminal mayestablish an R/W-CE communication link therebetween as a first stepinstead of establishing the P2P communication link. In this case, theMFP 10 and the target terminal may perform all the above-describedcommunication using the established R/W-CE communication link (i.e.,might not disconnect the R/W-CE communication link establishedtherebetween). In other embodiments, for example, the MFP 10 and thetarget terminal may establish a P2P communication link therebetween as afirst step. After the P2P communication link is disconnected, the MFP 10and the target terminal may again establish a P2P communication linktherebetween to perform all the above-described communicationtherebetween Likewise, the MFP 10 and the target terminal may establishan R/W-CE communication link therebetween as a first step. After theR/W-CE communication link is disconnected, the MFP 10 and the targetterminal may again establish an R/W-CE communication link therebetweento perform all the above-described communication therebetween.

In the above-described illustrative embodiments, each of the MFP 10 andthe mobile terminals PT1, PT2, and PT3 includes the NFC IF (e.g., theNFC I/F 20 or 80) for performing communication using the NFC system. Inother embodiments, for example, instead of the NFC I/F, each of the MFP10 and the mobile terminals PT1, PT2, and PT3 may include, for example,a short-range wireless communication I/F that may be configured toperform short-range wireless communication using another standard, e.g.,TransferJet™ (TransferJet™ is a trademark owned by Sony Corporation ofTokyo, Japan). This variation may be another example of the firstinterface.

In the above-described illustrative embodiments, in step S16 in FIG. 2,the CPU 32 of the MFP 10 transmits, to the target terminal, the Responsesignal including the SSID and password to be used in the WFDNW in whichthe MFP 10 serves as a G/O-status device. Nevertheless, in otherembodiments, for example, in step S16 in FIG. 2, the CPU 32 of the MFP10 may transmit a Response signal including one or more pieces of otherinformation to the target terminal. For example, it is assumed that thetarget terminal serves as a G/O-status device. In this variation, theCPU 32 of the MFP 10 may transmit, to the target terminal, a Responsesignal including request information for requesting transmission of theSSID and the password. In this case, the target terminal that hasreceived the Response signal may transmit the SSID and the password tothe MFP 10. Generally speaking, the second response information may beany information that may relate to the network information.

In the first and second illustrative embodiments, the execution requestthat is transmitted to the MFP 10 by the CPU 92 of the mobile terminalPT1 includes the information indicating the particular function that isrequested to be executed (e.g., step S60 in FIG. 4). Nevertheless, forexample, in modifications to the first and second illustrativeembodiments, the execution request that is transmitted to the MFP 10 bythe CPU 92 of the mobile terminal PT1 may include information requestingexecution of a handover but not include the information indicating theparticular function that is requested to be executed. The executionrequest according to this variation may be another example of the“particular request information” and “request information”.

The SFL table 40 may include a plurality of pieces of combinedinformation in which only the user ID (e.g., “U1”) and the password(e.g., “P1”) are associated with each other. That is, the SFL table 40might not necessarily include the availability information for printingfunction (e.g., “OK” or “NG”) that indicates whether the printingfunction is available to the user, the availability information forscanning function (e.g., “OK” or “NG”) that indicates whether thescanning function is available to the user, and the availabilityinformation for H/O (e.g., “OK” or “NG”) that indicates whether the useris allowed to perform a handover. In this case, when the authenticationusing the SFL authentication information received from the targetterminal is successful (e.g., YES in step S38 in FIG. 3 or YES in stepS110 in FIG. 8), the CPU 32 of the MFP 10 may execute the requestedfunction without determining whether the requested function is availableto the user.

In other embodiments, for example, in each of steps S42 in FIG. 3 andS118 in FIG. 8, the CPU 32 may transmit the SSID and the password to thetarget terminal when the CPU 32 receives, from the target terminal, arequest for transmission of the SSID and the password. That is, the CPU32 may be configured not to transmit the SSID and the password to thetarget terminal until the CPU 32 receives the request for transmissionof the SSID and the password from the target terminal, after the MFP 10changes to the G/O status.

In other embodiments, for example, the MFP 10 may include a touch panelhaving functions of both the operation unit 12 and the display unit 14.Likewise, the mobile terminal PT1 may include a touch panel havingfunctions of both the operation unit 72 and the display unit 74. Thatis, the operation unit 12 and the display unit 14 of the MFP 10 (or theoperation unit 72 and the display unit 74 of the mobile terminal PT1)may consist of a single hardware.

The “communication device” is not limited to a multifunction device thatis configured to perform the printing function and the scanning function(e.g., the MFP 10). In other embodiments, for example, the“communication device” may be a printer that may be configured toperform the printing function only or a scanner that may be configuredto perform the scanning function only. The “communication device” may bea device (e.g., a PC, a server, a mobile terminal (e.g., a mobile phone,a smartphone, and a PDA)) that may be configured to perform one or morefunctions (e.g., an image displaying function or a data calculatingfunction) other than the printing function and the scanning function.That is, the “communication device” may include any device that may becapable of performing communication using the NFC system and wirelessLAN communication. The “terminal device” is also not limited to themobile terminals PT1, PT2, and PT3, but may include any device that maybe capable of performing short-range communication (e.g., communicationusing the NFC system) and wireless LAN communication.

In the above-described illustrative embodiments, the processing in allsteps depicted in FIGS. 2, 3, 4, and 8 is implemented by software (e.g.,the program). Nevertheless, in other embodiments, for example, theprocessing in at least one of the steps depicted in FIGS. 2, 3, 4, and 8is implemented by hardware, for example, a logical circuit.

Further, the technical elements described in the specification and thedrawings exhibit technical usability alone or in various combinations,and are not limited to those in the claims at the time of theapplication of the disclosure. Furthermore, the techniques described asexamples in the specification or drawings may achieve a plurality ofobjects simultaneously, and has technical utility by achieving any oneof these objects.

What is claimed is:
 1. A terminal device comprising: a short-rangewireless interface configured to perform wireless communication with acommunication device using a short-range wireless communicationprotocol, the short-range wireless interface operable in a peer-to-peermode and another mode; a Wi-Fi interface configured to perform wirelesscommunication with the communication device using a Wi-Fi-compliantcommunication protocol; a processor; and a memory storingcomputer-readable instructions therein, the computer-readableinstruction, when executed by the processor, causing the terminal deviceto perform: transmitting, over a short-range wireless connection via theshort-range wireless interface in the peer-to-peer mode, requestinformation to the communication device, the request information toperform a function by the communication device; receiving, via theshort-range wireless interface in the peer-to-peer mode, first responseinformation from the communication device in response to transmittingthe request information; in response to a termination and reactivationof the short-range wireless connection to the communication device,transmitting, via the short-range wireless interface in the other mode,authentication information to the communication device; when theauthentication information is determined to be correct by thecommunication device, performing, via the short-range wireless interfacein the other mode, communication of network information to be used toconnect with the Wi-Fi interface; and when the network information hasbeen communicated, performing wireless communication with thecommunication device using the Wi-Fi interface.
 2. The terminal deviceaccording to claim 1, wherein the instructions further comprise: inresponse to the termination, switching the peer-to-peer mode to theother mode; and in response to the communication of network information,switching the other mode to the peer-to-peer mode.
 3. The terminaldevice according to claim 1, wherein the other mode is a card emulationmode.
 4. The terminal device according to claim 1, wherein the othermode is a reader/writer mode.
 5. The terminal device according to claim1, wherein the instructions further comprise: receiving a disconnectsignal from the communication device via the short-range wirelessinterface in the peer-to-peer mode.
 6. The terminal device according toclaim 1, wherein the short-range wireless interface is an NFC-compatibleinterface.
 7. A communication device comprising: a short-range wirelessinterface configured to perform wireless communication with a terminaldevice using a short-range wireless communication protocol, theshort-range wireless interface operable in at least one of apeer-to-peer mode and in another mode, the other mode including at leastone of a reader/writer mode and a card-emulation mode; a Wi-Fi interfaceconfigured to perform wireless communication with the terminal deviceusing a Wi-Fi-compliant communication protocol; a processor; and amemory storing computer-readable instructions therein, thecomputer-readable instruction, when executed by the processor, causingthe communication device to perform: receiving, over a short-rangewireless connection via the short-range wireless interface, requestinformation from the terminal device, the request information to performa function by the communication device; transmitting, via theshort-range wireless interface, first response information to theterminal device in response to the receiving the request information;receiving, via the short-range wireless interface, authenticationinformation from the terminal device; transmitting the receivedauthentication information to another device; receiving confirmationfrom the other device that the received authentication information iscorrect; when the received authentication information is correct,performing, via the short-range wireless interface, communication ofnetwork information to be used to connect with the Wi-Fi interface,otherwise, when the received authentication information is incorrect,not performing communication of the network information; and when thenetwork information has been communicated, performing wirelesscommunication with the terminal device using the Wi-Fi interface.
 8. Thecommunication device according to claim 7, wherein the requestinformation is received in the peer-to-peer mode, wherein the firstresponse information is transmitted in the peer-to-peer mode, whereinthe authentication information is received in the peer-to-peer mode, andwherein the network information is communicated in the peer-to-peermode.
 9. The communication device according to claim 7, wherein therequest information is received in the other mode, wherein the firstresponse information is transmitted in the other mode, wherein theauthentication information is received in the other mode, and whereinthe network information is communicated in the other mode.
 10. Thecommunication device according to claim 7, wherein the short-rangewireless connection becomes inactive after the transmitting of the firstresponse information, and wherein the instructions further comprise:reestablishing the short-range wireless connection before receiving theauthentication information from the terminal device.
 11. Thecommunication device according to claim 7, wherein the short-rangewireless interface is an NFC-compatible interface.
 12. The communicationdevice according to claim 7, wherein the communication device is amulti-function device configured to perform at least one of a printingfunction and a scanning function, the authentication information isinformation for performing the at least one of the printing function andthe scanning function, the instructions further comprise: when thereceived authentication information is correct, performing thecommunication of the network information and performing the at least oneof the printing function and the scanning function.
 13. Thecommunication device according to claim 7, wherein the first responseinformation is information that causes the terminal device to transmitthe authentication information via the short-range wireless interface inthe other mode.
 14. The communication device according to claim 7,wherein the instructions further comprise: terminating the short-rangewireless connection to the terminal device in the peer-to-peer modeafter transmitting the first response information to the terminaldevice; and reactivating the short-range wireless connection to theterminal device in the other mode after terminating the short-rangewireless connection to the terminal device.
 15. The communication deviceaccording to claim 7, wherein the memory further stores settinginformation indicating whether the transmitting of the authenticationinformation is to be performed; wherein transmitting the first responseinformation is performed when the setting information indicates that thetransmitting of the authentication information is to be performed; andwherein the instructions further comprise: when the setting informationindicates that the transmitting of the authentication information is notto be performed, transmitting, via the short-range wireless interface inthe peer-to-peer mode, second response information that includesinformation relating to the network information without transmitting thefirst response information.
 16. The communication device according toclaim 7, wherein the instructions further comprise: executing a firstdetermination process in which the communication device determineswhether the communication device performs the communication of thenetwork information in response to the receiving of the requestinformation; and when determined, in the first determination process,that the communication device does not perform the communication of thenetwork information, transmitting, via the short-range wirelessinterface in the peer-to-peer mode, third response information thatindicates to prohibit the performing of the wireless communication withthe terminal device using the Wi-Fi interface.
 17. The communicationdevice according to claim 7, wherein the other mode is a reader/writermode.
 18. The communication device according to claim 7, wherein theother mode is a card emulation mode.
 19. The communication deviceaccording to claim 7, wherein the instructions further comprise: aftertransmitting the first response information via the short-range wirelessinterface, transmitting a deactivation signal to the terminal device viathe short-range wireless interface in the peer-to-peer mode.
 20. Anon-transitory computer-readable medium storing computer-readableinstructions for a terminal device, wherein the terminal devicecomprises: a short-range wireless interface configured to performwireless communication with a communication device using a short-rangewireless communication protocol, the short-range wireless interfaceoperable in a peer-to-peer mode and another mode; a Wi-Fi interfaceconfigured to perform wireless communication with the communicationdevice using a Wi-Fi-compliant communication protocol; and a processor,wherein the computer-readable instructions, when executed by theprocessor, cause the terminal device to perform: transmitting, over ashort-range wireless connection via the short-range wireless interfacein the peer-to-peer mode, request information to the communicationdevice, the request information to perform a function by thecommunication device; receiving, via the short-range wireless interfacein the peer-to-peer mode, first response information from thecommunication device in response to transmitting of the requestinformation; in response to a termination and reactivation of theshort-range wireless connection to the communication device,transmitting, via the short-range wireless interface in the other mode,authentication information to the communication device; when theauthentication information is determined to be correct by thecommunication device, performing, via the short-range wireless interfacein the other mode, communication of network information to be used toconnect with the Wi-Fi interface; and when the network information hasbeen communicated, performing wireless communication with thecommunication device using the Wi-Fi interface.